is-dependency

0.0.0 • Public • Published

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
}
*/

Readme

Keywords

Package Sidebar

Install

npm i is-dependency

Weekly Downloads

0

Version

0.0.0

License

MIT

Unpacked Size

5.09 kB

Total Files

4

Last publish

Collaborators

  • andre_garvin