Socket
Socket
Sign inDemoInstall

electrode-check-dependencies

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

electrode-check-dependencies

Maintain uniform dependencies for components


Version published
Weekly downloads
5
increased by25%
Maintainers
1
Weekly downloads
 
Created
Source

Electrode Check Dependencies

This module provides function to check a package.json's dependencies against another list to make sure the package doesn't deviates from a uniform dependencies. This is mainly for ensuring React components use the same version of a common module when being consumed by an app.

Install

npm install electrode-check-dependencies

Usage


const CheckDep = require("electrode-check-dependencies");

CheckDep.checkPkgFile( "<component_package.json>", "<uniform_dep.json>" ).catch( (err) => {
  console.log("component deviates from uniform dependencies");
});

or


const CheckDep = require("electrode-check-dependencies");
const component = require("./package.json").dependencies;
const check = require("./check.json").dependencies;


const result = CheckDep.checkDependencies( component, check );
if ( result.unsatisfyCommon.length > 0 || result.unexpected.length > 0 ) {
  console.log("component deviates from uniform dependencies");
}

FAQs

Package last updated on 16 Sep 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc