npm

Join us for the upcoming webinar, "Enterprise JavaScript done right: the tools you love, the security you need."Sign up here »

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

install

npm i npm-package-files

Downloadsweekly downloads

3

version

1.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability