https://github.com/dawsbot/basify
Strip filename extensions
https://github.com/dawsbot/basify
Last synced: 2 months ago
JSON representation
Strip filename extensions
- Host: GitHub
- URL: https://github.com/dawsbot/basify
- Owner: dawsbot
- License: mit
- Created: 2016-02-17T06:10:17.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2019-04-19T11:36:06.000Z (about 7 years ago)
- Last Synced: 2025-12-30T16:12:10.674Z (6 months ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# basify [](https://travis-ci.org/dawsonbotsford/basify) [](https://www.npmjs.com/package/basify)
> Get the base name of a file
## Install
```
npm install --save basify
```
## Usage
```js
const basify = require('basify');
basify('index.js');
//=> 'index'
basify(['index1.js', 'index2.html']);
//=> ['index1', 'index2']
```
## API
### basify(target)
##### target
Type: `string` || `Array`
Removes the filetype extension and returns the base.
## License
MIT © [Dawson Botsford](http://dawsonbotsford.com)