src/index.js
function getAllValuesToRank(item, keys) {
  return keys.reduce((allVals, key) => {
    const values = getItemValues(item, key)
    if (values) {
      values.forEach(itemValue => {
        allVals.push({
          itemValue,
          attributes: getKeyAttributes(key),
        })
      })
    }
    return allVals
  }, [])
}
function getAllValuesToRank(item, keys) {
  return keys.reduce((allVals, key) => {
    const values = getItemValues(item, key)
    if (values) {
      values.forEach(itemValue => {
        allVals.push({
          itemValue,
          attributes: getKeyAttributes(key),
        })
      })
    }
    return allVals
  }, [])
}
function getAllValuesToRank ( item , keys ) { return keys . reduce ( ( allVals , key ) => { const values = getItemValues ( item , key ) if ( values ) { values . forEach ( itemValue => { allVals . push ( { itemValue , attributes : getKeyAttributes ( key ) , } ) } ) } return allVals } , [ ] ) }
Gets all the values for the given keys in the given item and returns an array of those values
@param {Object} item - the item from which the values will be retrieved
@param {Array} keys - the keys to use to retrieve the values
@return {Array} objects with {itemValue, attributes}
Gets all the values for the given keys in the given item and returns an array of those values