An open API service indexing awesome lists of open source software.

https://github.com/dawsbot/basify

Strip filename extensions
https://github.com/dawsbot/basify

Last synced: 2 months ago
JSON representation

Strip filename extensions

Awesome Lists containing this project

README

          

# basify [![Build Status](https://travis-ci.org/dawsonbotsford/basify.svg?branch=master)](https://travis-ci.org/dawsonbotsford/basify) [![npm](https://img.shields.io/npm/v/basify.svg)](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)