@jswork/strip-extname
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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.

Package Sidebar

Install

npm i @jswork/strip-extname

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

5 kB

Total Files

7

Last publish

Collaborators

  • afeiship