antv-l7/node_modules/file-name
thinkinggis f7e5376b7d fix(fix css): fix css png 2019-11-22 18:04:14 +08:00
..
LICENSE fix(fix css): fix css png 2019-11-22 18:04:14 +08:00
README.md fix(fix css): fix css png 2019-11-22 18:04:14 +08:00
index.js fix(fix css): fix css png 2019-11-22 18:04:14 +08:00
package.json fix(fix css): fix css png 2019-11-22 18:04:14 +08:00

README.md

file-name NPM version

Get the basename of a filepath excluding extension.

Because I've typed the following one too many times:

function filename(fp) {
  return path.basename(fp, path.extname(fp));
}

Install

Install with npm

$ npm i file-name --save

Usage

var filename = require('file-name');
filename('a/b/c/foo.json');
//=> 'foo'

Other useful node.js path utils:

Running tests

Install dev dependencies:

$ npm i -d && npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Author

Jon Schlinkert

License

Copyright © 2015 Jon Schlinkert Released under the MIT license.


This file was generated by verb-cli on October 20, 2015.