npm-package-files

1.0.0 • Public • Published

npm-package-files Build Status

List and detect npm package files

Install

$ npm install --save npm-package-files

Usage

Handles:

  • package.json
  • npm-shrinkwrap.json
  • package-lock.json
var isPackage = require('npm-package-files')
 
isPackage('package.json')
//=> true
 
isPackage.names['package.json']
//=> true

API

isPackage(basename) -> boolean

basename

Required
Type: string

The base file name of a package file.

isPackage.names -> object

A map of valid package names. The basenames are the keys and the values are true.

License

MIT © Ben Drucker

Package Sidebar

Install

npm i npm-package-files

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • bendrucker