filename

Type:Function
Status:stable
Since:1.0.0
Platform:node
@blackbyte.sugar.node.fs

Return the filename from the passed path with or without the extension

Params

  1. path*-String

    The path to take the filename from

  2. withExtensiontrueBoolean

    Tell if we want the filename with or without the extension

Return

  1. -String

    The requested filename

Example

import { filename } from '@blackbyte/sugar/fs';
filename('hello/world.js'); // => world.js

Todo

  • testsnormal