npm.io
1.0.0 • Published 11 years ago

remove-ext

Licence
MIT
Version
1.0.0
Deps
0
Vulns
0
Weekly
0
Stars
1

remove-ext Build Status

Remove the extension from the string path to file. It's similar to path.basename.

Install the module with: npm install remove-ext

Example

var rmExt  = require('remove-ext')
    path   = '/path/to/gif.gif',
    result = rmExt(path, 'gif');

console.log(result); // 'path/to/gif'

License

Copyright (c) 2014 Fredrik Forsmo
Licensed under the MIT license.

Keywords