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

neuron-tree

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

neuron-tree

Generates the config.tree of neuron

  • 2.1.0
  • latest
  • Source
  • npm
  • Socket score

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

neuron-tree NPM version Build Status Dependency Status

Utilities to generate the config.tree for neuron.

<name>: {
  <version>: {
    // dependencies and async dependencies
    <dep-name>: [
      // synchronous dependencies
      {
        <sync-dep-range>: <sync-dep-version>, ...
      },
      // asynchronous dependencies
      {
        <async-dep-range>: <async-dep-version>, ...
      }
    ]
  }
}

Install

$ npm install neuron-tree --save

Usage

var tree = require('neuron-tree');
tree(pkg, {
  cwd: cwd,
  built_root: built_root,
  dependencyKeys: ['dependencies', 'asyncDependencies']
}, function(err, tree, shrinkwrap){
  // ...
});

tree(pkg, options, callback)

Generates the object tree which neuron uses as the config.tree.

  • pkg Object cortex json
  • options Object
    • cwd path
    • built_root path= the path from where we can find all installed and built packages
    • shrinkwrap Object= the object of cortex-shrinkwrap.json
    • dependencyKeys Array=['dependencies', 'asyncDependencies']
    • ignore_shrink_file Boolean=false if true, neuron-tree will always generate new shrinkwrap tree.
dependencyKeys

The array of types of dependencies, default to

[
  "dependencies",
  "asyncDependencies"
]

You could include other keys of dependencies in the array, available keys:

'dependencies', 'asyncDependencies', 'engines', devDependencies

Arguments Overloading
  • if options.shrinkwrap not defined, then:
  • if options.ignore_shrink_file not defined, neuron-tree will try to generate shrinkwrap itself, else:
  • neuron-tree will try to read the cortex-shrinkwrap.json, else:
  • if cortex-shrinkwrap.json not found, neuron-tree will try to generate shrinkwrap itself.

tree.parse(shrinked, dependencyKeys)

  • shrinked Object the shrinked object of shrinked
  • dependencyKeys Array.<String>

Parses the shrinked B+ tree, and generates a simpler tree for config.tree of neuron.

License

MIT

Keywords

FAQs

Package last updated on 10 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