pkg-dep
Get package dependencies
Install
$ npm i pkg-dep
Example
const pkgDep =
const PkgDep = const pkgDep =
Methods
consolepkgDeppkgDepconsole
API
new pkgDep([options])
Returns a new
instance.
pkgDep()
Returns a instance of module.
pkgDep.config([options])
Configure with options.
options
Type: Object
cwd
Type: string
Default: process.cwd()
Current working directory.
pkgDep.get()
Returns a Promise
of dependencies object.
pkgDep.getSync()
Returns dependencies object.
pkgDep.has()
Returns a result(Promise
) of typeof boolean
whether a dependency exists or not.
pkgDep.hasSync()
Returns a result typeof boolean
whether a dependency exists or not.
License
MIT © Joydip Roy (rjoydip)