Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including neuron-hashmaps with all npm packages installed. Try it out:

var neuronHashmaps = require("neuron-hashmaps")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

neuron-hashmaps v1.1.1

Utilities to generate range map and dependency tree for neuron.

neuron-hashmaps NPM version Build Status Dependency Status

Utilities to generate range map and dependency tree for neuron.

Install

$ npm install neuron-hashmaps --save

Usage

var hashmaps = require('neuron-hashmaps');

hashmaps(shrinkwrap)

var hm = hashmaps(shrink_json);
var neuron_text = util.format(
  'neuron.config({ranges: %s, depTree: %s});',
  JSON.stringify(hm.ranges),
  JSON.stringify(hm.depTree)
);
  • shrinkwrap Object the object of the shrinkwrap.json

Initializes the hashmaps from the shrinkwrap object

.ranges

jquery: {
  '~1.9.0': '1.9.3'
},

Returns Object the range map which is the value of neuron.config.ranges

Gets the current range map.

.depTree

mbox: [
  // dependencies
  {
    jquery: '~1.9.0'
  },
  // async dependencies
  {
    hippo: '~1.0.0'
  }
],

Returns Object the deps tree which is the value of neuron.config.depTree

.engines(name, version)

[
  {
    name: 'neuron',
    version: '5.0.0'
  },
  ...
]
  • name String
  • version String

Returns Array the engines of the specified package.

License

MIT

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free