registry.js
function get(data) {
    var parser = this
      , matches = [];

    //
    // Another npm oddity, it allows licenses to be specified in to different
    // properties. Because why the fuck not?
    //
    ['license', 'licenses'].forEach(function each(key) {
      if ('string' === typeof data[key]) {
        return matches.push(data[key]);
      }

      if (Array.isArray(data[key])) {
        return Array.prototype.push.apply(
          matches,
          data[key].map(function map(item) {
            return parser.license(item);
          }).filter(Boolean)
        );
      }

      if ('object' === typeof data[key] && parser.license(data[key])) {
        return Array.prototype.push.apply(
          matches,
          [parser.license(data[key])]
        );
      }
    });

    if (matches.length) return matches;
  }
function get(data) {
    var parser = this
      , matches = [];

    //
    // Another npm oddity, it allows licenses to be specified in to different
    // properties. Because why the fuck not?
    //
    ['license', 'licenses'].forEach(function each(key) {
      if ('string' === typeof data[key]) {
        return matches.push(data[key]);
      }

      if (Array.isArray(data[key])) {
        return Array.prototype.push.apply(
          matches,
          data[key].map(function map(item) {
            return parser.license(item);
          }).filter(Boolean)
        );
      }

      if ('object' === typeof data[key] && parser.license(data[key])) {
        return Array.prototype.push.apply(
          matches,
          [parser.license(data[key])]
        );
      }
    });

    if (matches.length) return matches;
  }
function get ( data ) { var parser = this , matches = [ ] ; // // Another npm oddity, it allows licenses to be specified in to different // properties. Because why the fuck not? // [ 'license' , 'licenses' ] . forEach ( function each ( key ) { if ( 'string' === typeof data [ key ] ) { return matches . push ( data [ key ] ) ; } if ( Array . isArray ( data [ key ] ) ) { return Array . prototype . push . apply ( matches , data [ key ] . map ( function map ( item ) { return parser . license ( item ) ; } ) . filter ( Boolean ) ) ; } if ( 'object' === typeof data [ key ] && parser . license ( data [ key ] ) ) { return Array . prototype . push . apply ( matches , [ parser . license ( data [ key ] ) ] ) ; } } ) ; if ( matches . length ) return matches ; }
Retrieve the possible locations of the license information.

@param {Object} data The package.json or npm package contents.
@returns {Array}
@api private
Retrieve the possible locations of the license information .