Skip to content

wired result of basename(file, extname(file)) #9064

@tauri-bot

Description

@tauri-bot

This issue has been upstreamed from tauri-apps/tauri-docs#1905

use ext from call extname for basename return wired result:

const ext = await extname('some-json-file.json'); // 'json'
const nameNoExt = await basename('some-json-file.json', ext); // 'some--file.'

Maybe the correct usage is as below?:

const ext = await extname('some-json-file.json'); // 'json'
const nameNoExt = await basename('some-json-file.json', '.' + ext); // some-json-file

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions