Skip to content

Latest commit

 

History

History
32 lines (19 loc) · 527 Bytes

readme.md

File metadata and controls

32 lines (19 loc) · 527 Bytes

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