0.0.0 • Published 6 years ago
is-dependency v0.0.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
}
*/
0.0.0
6 years ago