showing results for - "path basename nodejs"
Isabelle
19 Sep 2020
1/* The path.basename() method returns the last portion of a path,
2similar to the Unix basename command. Trailing directory separators
3are ignored, see path.sep. */
4
5path.basename('/foo/bar/baz/asdf/quux.html');
6// Returns: 'quux.html'
7
8path.basename('/foo/bar/baz/asdf/quux.html', '.html');
9// Returns: 'quux'