{"_id":"file-name","_rev":"96370","name":"file-name","description":"Get the basename of a filepath excluding extension. ","dist-tags":{"latest":"0.1.0"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"time":{"modified":"2021-06-03T10:32:13.000Z","created":"2015-10-20T05:04:22.087Z","0.1.0":"2015-10-20T05:04:22.087Z"},"users":{},"author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/file-name.git"},"versions":{"0.1.0":{"name":"file-name","description":"Get the basename of a filepath excluding extension. ","version":"0.1.0","homepage":"https://github.com/jonschlinkert/file-name","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/file-name.git"},"bugs":{"url":"https://github.com/jonschlinkert/file-name/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"devDependencies":{"mocha":"*"},"keywords":["basename","file","filename","filepath","fp","name","path"],"verb":{"related":{"description":"Other useful node.js path utils","list":["relative","is-absolute","is-relative","parse-filepath"]}},"_id":"file-name@0.1.0","_shasum":"12b122f120f9c34dbc176c1ab81a548aced6def7","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"12b122f120f9c34dbc176c1ab81a548aced6def7","size":1997,"noattachment":false,"key":"/file-name/-/file-name-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/file-name/download/file-name-0.1.0.tgz"},"directories":{},"publish_time":1445317462087,"_cnpm_publish_time":1445317462087,"_hasShrinkwrap":false}},"readme":"# file-name [![NPM version](https://badge.fury.io/js/file-name.svg)](http://badge.fury.io/js/file-name)\n\n> Get the basename of a filepath excluding extension.\n\nBecause I've typed the following one too many times:\n\n```js\nfunction filename(fp) {\n  return path.basename(fp, path.extname(fp));\n}\n```\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/)\n\n```sh\n$ npm i file-name --save\n```\n\n## Usage\n\n```js\nvar filename = require('file-name');\nfilename('a/b/c/foo.json');\n//=> 'foo'\n```\n\n## Related projects\n\nOther useful node.js path utils:\n\n* [is-absolute](https://www.npmjs.com/package/is-absolute): Return true if a file path is absolute. | [homepage](https://github.com/jonschlinkert/is-absolute)\n* [is-relative](https://www.npmjs.com/package/is-relative): Returns `true` if the path appears to be relative. | [homepage](https://github.com/jonschlinkert/is-relative)\n* [parse-filepath](https://www.npmjs.com/package/parse-filepath): Parse a filepath into an object. Falls back on the native node.js `path.parse` method if… [more](https://www.npmjs.com/package/parse-filepath) | [homepage](https://github.com/jonschlinkert/parse-filepath)\n* [relative](https://www.npmjs.com/package/relative): Get the relative filepath from path A to path B. Calculates from file-to-directory, file-to-file, directory-to-file,… [more](https://www.npmjs.com/package/relative) | [homepage](https://github.com/jonschlinkert/relative)\n\n## Running tests\n\nInstall dev dependencies:\n\n```sh\n$ npm i -d && npm test\n```\n\n## Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/file-name/issues/new).\n\n## Author\n\n**Jon Schlinkert**\n\n+ [github/jonschlinkert](https://github.com/jonschlinkert)\n+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)\n\n## License\n\nCopyright © 2015 Jon Schlinkert\nReleased under the MIT license.\n\n***\n\n_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on October 20, 2015._","_attachments":{},"homepage":"https://github.com/jonschlinkert/file-name","bugs":{"url":"https://github.com/jonschlinkert/file-name/issues"},"license":"MIT"}