lib/meta/index.js
function scrapeMetadata (html, rules) {
  rules = rules || RULES
  const keys = Object.keys(rules)
  const $ = cheerio.load(html)
  const promises = keys.map(function (key) {
    return scrapeMetadatum($, '', rules[key])
  })

  return Promise.all(promises).then(function (values) {
    return keys.reduce(function (memo, key, i) {
      memo[key] = values[i]
      return memo
    }, {})
  })
}
function scrapeMetadata (html, rules) {
  rules = rules || RULES
  const keys = Object.keys(rules)
  const $ = cheerio.load(html)
  const promises = keys.map(function (key) {
    return scrapeMetadatum($, '', rules[key])
  })

  return Promise.all(promises).then(function (values) {
    return keys.reduce(function (memo, key, i) {
      memo[key] = values[i]
      return memo
    }, {})
  })
}
function scrapeMetadata ( html , rules ) { rules = rules || RULES const keys = Object . keys ( rules ) const $ = cheerio . load ( html ) const promises = keys . map ( function ( key ) { return scrapeMetadatum ( $ , '' , rules [ key ] ) } ) return Promise . all ( promises ) . then ( function ( values ) { return keys . reduce ( function ( memo , key , i ) { memo [ key ] = values [ i ] return memo } , { } ) } ) }
Scrape each entry in the metadata result dictionary in parallel.

@param {String} html
@param {String} url
@param {Object} rules (optional)
@return {Promise} metadata
Scrape each entry in the metadata result dictionary in parallel .