index.js
function queue(packages, ref, depth) {
    packages = shrinkwrap.dedupe(packages);

    Shrinkwrap.dependencies.forEach(function each(key) {
      if (this.production && 'devDependencies' === key) return;
      if ('object' !== this.type(packages[key])) return;

      Object.keys(packages[key]).forEach(function each(name) {
        var range = packages[key][name]
          , _id = name +'@'+ range;

        ref.dependencies = ref.dependencies || {};
        queue.push({
          name: name,       // Name of the module
          range: range,     // Semver range
          _id: _id,         // Semi unique id.
          parents: [ref],   // Reference to the parent module.
          depth: depth      // The depth of the reference.
        });
      });
    }, shrinkwrap);

    return queue;
  }
function queue(packages, ref, depth) {
    packages = shrinkwrap.dedupe(packages);

    Shrinkwrap.dependencies.forEach(function each(key) {
      if (this.production && 'devDependencies' === key) return;
      if ('object' !== this.type(packages[key])) return;

      Object.keys(packages[key]).forEach(function each(name) {
        var range = packages[key][name]
          , _id = name +'@'+ range;

        ref.dependencies = ref.dependencies || {};
        queue.push({
          name: name,       // Name of the module
          range: range,     // Semver range
          _id: _id,         // Semi unique id.
          parents: [ref],   // Reference to the parent module.
          depth: depth      // The depth of the reference.
        });
      });
    }, shrinkwrap);

    return queue;
  }
function queue ( packages , ref , depth ) { packages = shrinkwrap . dedupe ( packages ) ; Shrinkwrap . dependencies . forEach ( function each ( key ) { if ( this . production && 'devDependencies' === key ) return ; if ( 'object' !== this . type ( packages [ key ] ) ) return ; Object . keys ( packages [ key ] ) . forEach ( function each ( name ) { var range = packages [ key ] [ name ] , _id = name + '@' + range ; ref . dependencies = ref . dependencies || { } ; queue . push ( { name : name , // Name of the module range : range , // Semver range _id : _id , // Semi unique id. parents : [ ref ] , // Reference to the parent module. depth : depth // The depth of the reference. } ) ; } ) ; } , shrinkwrap ) ; return queue ; }
Scan the given package.json like structure for possible dependency
locations which will be automatically queued for fetching and processing.

@param {Object} packages The packages.json body.
@param {Object} ref The location of the new packages in the tree.
@param {Number} depth How deep was this package nested
@api private
Scan the given package . json like structure for possible dependency locations which will be automatically queued for fetching and processing .