src/local.js
function getNormalizedTags(tags) {
  return Object.keys(tags).sort().reduce((memo, tag) => {
    const value = tags[tag];

    if (typeof value === 'boolean') {
      return memo.concat(value === true ? 1 : -1);
    } else if (typeof value === 'number') {
      return memo.concat(value);
    }

    return memo;
  }, []);
}
function getNormalizedTags(tags) {
  return Object.keys(tags).sort().reduce((memo, tag) => {
    const value = tags[tag];

    if (typeof value === 'boolean') {
      return memo.concat(value === true ? 1 : -1);
    } else if (typeof value === 'number') {
      return memo.concat(value);
    }

    return memo;
  }, []);
}
function getNormalizedTags ( tags ) { return Object . keys ( tags ) . sort ( ) . reduce ( ( memo , tag ) => { const value = tags [ tag ] ; if ( typeof value === 'boolean' ) { return memo . concat ( value === true ? 1 : - 1 ) ; } else if ( typeof value === 'number' ) { return memo . concat ( value ) ; } return memo ; } , [ ] ) ; }
Get normalized co-variate values.

@todo This ignores non-numeric and non-boolean tag values. Determine
an effective way to map strings and non-primitives to numbers.

@param {Object} tags Hash of tag names to tag values
@returns {Array}
Get normalized co - variate values .