is-extname

0.0.1 • Public • Published

is-extname Build Status

Check file extension name

Install

$ yarn add is-extname

Usage

const isExtname = require('is-extname')
 
const create = async file => {
  const extname = isExtname(file, 'json')
 
  if (extname) {
    return await create()
  }
 
  return new TypeError(`We don't support this type of file.`)
}

License

MIT © Bu Kinoshita

Dependencies (0)

    Dev Dependencies (3)

    Package Sidebar

    Install

    npm i is-extname

    Weekly Downloads

    2

    Version

    0.0.1

    License

    MIT

    Last publish

    Collaborators

    • bukinoshita