1.0.0 • Published 3 years ago

@jswork/strip-extname v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

strip-extname

Trim a file extension from a String.

version license size download

installation

npm install @jswork/strip-extname

usage

import stripExtname from '@jswork/strip-extname';

const src = 'path/subpath/file.txt.js';
const result1 = stripExtname(src, true);
const result2 = stripExtname(src);

//path/subpath/file
//path/subpath/file.txt

license

Code released under the MIT license.