콘텐츠로 이동

basename

이 콘텐츠는 아직 번역되지 않았습니다.

Module @netwiv/api/path · Kind Function

import { basename } from '@netwiv/api/path';

Returns the last portion of a path. Trailing directory separators are ignored.

function basename(path: string, ext?: string | undefined): Promise<string>
import { basename } from '@netwiv/api/path';
const base = await basename('path/to/app.conf');
assert(base === 'app.conf');

Upstream since 1.0.0


Descriptions come from the pinned @tauri-apps/api@2.11.1 declarations (MIT OR Apache-2.0); imports are shown with @netwiv/api paths.