index.js
function search(data, next) {
      if (!options.order.length) return next();
      if (Array.isArray(data)) data = data[0];

      debug('searching for licensing information for %s', data.name);

      var parser, result, name;

      async.doWhilst(function does(next) {
        name = options.order.shift();
        parser = parse.parsers[name];

        if (!parser.supported(data)) return next();

        debug('attempting to extract the license information using: %s', name);

        parser.parse(data, options, function parsed(err, license) {
          if (err) return next();

          result = license;
          if (result) debug('parsing with %s was successful', name);

          next();
        });
      }, function select() {
        return !result && options.order.length;
      }, function cleanup(err) {
        options = null;
        next(err, result, name);
      });
    }
function search(data, next) {
      if (!options.order.length) return next();
      if (Array.isArray(data)) data = data[0];

      debug('searching for licensing information for %s', data.name);

      var parser, result, name;

      async.doWhilst(function does(next) {
        name = options.order.shift();
        parser = parse.parsers[name];

        if (!parser.supported(data)) return next();

        debug('attempting to extract the license information using: %s', name);

        parser.parse(data, options, function parsed(err, license) {
          if (err) return next();

          result = license;
          if (result) debug('parsing with %s was successful', name);

          next();
        });
      }, function select() {
        return !result && options.order.length;
      }, function cleanup(err) {
        options = null;
        next(err, result, name);
      });
    }
function search ( data , next ) { if ( ! options . order . length ) return next ( ) ; if ( Array . isArray ( data ) ) data = data [ 0 ] ; debug ( 'searching for licensing information for %s' , data . name ) ; var parser , result , name ; async . doWhilst ( function does ( next ) { name = options . order . shift ( ) ; parser = parse . parsers [ name ] ; if ( ! parser . supported ( data ) ) return next ( ) ; debug ( 'attempting to extract the license information using: %s' , name ) ; parser . parse ( data , options , function parsed ( err , license ) { if ( err ) return next ( ) ; result = license ; if ( result ) debug ( 'parsing with %s was successful' , name ) ; next ( ) ; } ) ; } , function select ( ) { return ! result && options . order . length ; } , function cleanup ( err ) { options = null ; next ( err , result , name ) ; } ) ; }
Search for the correct way of parsing out the license information.
Search for the correct way of parsing out the license information .