Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

shrinked

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shrinked

Parses the shrinkwrap.json and returns the B+ tree of the dependencies.

  • 0.1.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

shrinked NPM version Build Status Dependency Status

Parses the shrinkwrap.json and returns the B+ tree of the dependencies.

<name>: {
  <version>: {
    dependencies: {
      <dep-name>: {
        <dep-range>: <dep-version>
      }
    },
    
    asyncDependencies: ...,
    devDependencies: ...
  }
}

Install

$ npm install shrinked --save

Usage

var shrinked = require('shrinked');

shrinked(file, [options], callback)

  • file path Absolute path of the xxx-shrinkwrap.json
  • callback function(err, tree)
  • err Error
  • tree Object the B+ tree of dependencies which described above.
  • options Object
    • dependencyKeys Array=['dependencies'] into which dependency key should shrinked decende down.
shrinked('cortex-shrinkwrap.json', {
  dependencyKeys: [
    'dependencies',
    // Then `shrinked` will parse three more keys in addition.
    'asyncDependencies',
    'devDependencies',
    'engines'
  ]
}, function(err, tree){
  if (err) {
    return console.error(err);
  }
  console.log('The B+ tree is', util.inspect(tree, depth: 10));
});

shrinked.parse(json, [options])

  • json Object the object of shrinkwrap.json

Returns tree

License

MIT

Keywords

FAQs

Package last updated on 06 Jul 2014

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