index.js
function Shrinkwrap(options) {
  this.fuse();

  options = options || {};

  options.registry = 'registry' in options
    ? options.registry
    : 'http://registry.nodejitsu.com/';

  options.production = 'production' in options
    ? options.production
    : process.NODE_ENV === 'production';

  options.optimize = 'optimize' in options
    ? options.optimize
    : true;

  options.limit = 'limit' in options
    ? options.limit
    : 10;

  options.mirrors = 'mirrors' in options
    ? options.mirrors
    : false;

  this.registry = 'string' !== typeof options.registry
    ? options.registry
    : new Registry({
    registry: options.registry || Registry.mirrors.nodejitsu,
    githulk: options.githulk,
    mirrors: options.mirrors
  });

  this.production = options.production;     // Don't include devDependencies.
  this.limit = options.limit;               // Maximum concurrency.
  this.cache = Object.create(null);         // Dependency cache.
}
function Shrinkwrap(options) {
  this.fuse();

  options = options || {};

  options.registry = 'registry' in options
    ? options.registry
    : 'http://registry.nodejitsu.com/';

  options.production = 'production' in options
    ? options.production
    : process.NODE_ENV === 'production';

  options.optimize = 'optimize' in options
    ? options.optimize
    : true;

  options.limit = 'limit' in options
    ? options.limit
    : 10;

  options.mirrors = 'mirrors' in options
    ? options.mirrors
    : false;

  this.registry = 'string' !== typeof options.registry
    ? options.registry
    : new Registry({
    registry: options.registry || Registry.mirrors.nodejitsu,
    githulk: options.githulk,
    mirrors: options.mirrors
  });

  this.production = options.production;     // Don't include devDependencies.
  this.limit = options.limit;               // Maximum concurrency.
  this.cache = Object.create(null);         // Dependency cache.
}
function Shrinkwrap ( options ) { this . fuse ( ) ; options = options || { } ; options . registry = 'registry' in options ? options . registry : 'http://registry.nodejitsu.com/' ; options . production = 'production' in options ? options . production : process . NODE_ENV === 'production' ; options . optimize = 'optimize' in options ? options . optimize : true ; options . limit = 'limit' in options ? options . limit : 10 ; options . mirrors = 'mirrors' in options ? options . mirrors : false ; this . registry = 'string' !== typeof options . registry ? options . registry : new Registry ( { registry : options . registry || Registry . mirrors . nodejitsu , githulk : options . githulk , mirrors : options . mirrors } ) ; this . production = options . production ; // Don't include devDependencies. this . limit = options . limit ; // Maximum concurrency. this . cache = Object . create ( null ) ; // Dependency cache. }
Generate a new Shrinkwrap from a given package or module.

Options:

- registry: URL of the npm registry we should use to read package information.
- production: Should we only include production packages.
- limit: Amount of parallel processing tasks we could use to retrieve data.
- optimize: Should we attempt to optimize the data structure in the same way
that npm would have done it.
- mirrors: A list of npm mirrors to be used with our registry.
- githulk: Optional preconfigured GitHulk.

@constructor
@param {Object} options Options.
@api public
Generate a new Shrinkwrap from a given package or module .