10000 wired result of `basename(file, extname(file))` · Issue #1905 · tauri-apps/tauri-docs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
wired result of basename(file, extname(file)) #1905
Closed
@wsw0108

Description

@wsw0108

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

    Status

    ✅ Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0