0.0.0 • Published 8 years ago
is-dependency
Licence
MIT
Version
0.0.0
Deps
0
Size
5 kB
Vulns
0
Weekly
0
isDependency: A really dumb node module
This module tells you wether or not if the name of a package is a dependency of another package.
npm i is-dependency -S
const isDependency = require('is-dependency')
// this looks for the most relative node_modules path and check if axios exists
const dependent = await isDependency('axios')
// returns a boolean value wether the pacakge 'is-buffer' is a dependency to 'express'
await isDependency('express', 'is-buffer')
// This will return a object
await isDependency('rimraf', ['bar', 'foo', 'is-dumb'])
/*
{
foo: false,
bar: false,
'is-dumb': false // more like this module itself
}
*/