basify

Get the base name of a file

Usage no npm install needed!

<script type="module">
  import basify from 'https://cdn.skypack.dev/basify';
</script>

README

basify Build Status npm

Get the base name of a file


Install

npm install --save basify

Usage

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