torso-bundle.js
function normalizeIds(ids) {
    if (_.isArray(ids)) {
      // remove any nesting of arrays - it is assumed that the resulting ids will be simple string or number values.
      ids = _.flatten(ids);
      // remove any duplicate ids.
      return _.uniq(ids);
    } else if (_.isString(ids) || _.isNumber(ids)) {
      // individual id - convert to array for consistency.
      return [ids];
    } else if (ids && ids.skipObjectRetrieval) {
      return ids;
    }
  }
function normalizeIds(ids) {
    if (_.isArray(ids)) {
      // remove any nesting of arrays - it is assumed that the resulting ids will be simple string or number values.
      ids = _.flatten(ids);
      // remove any duplicate ids.
      return _.uniq(ids);
    } else if (_.isString(ids) || _.isNumber(ids)) {
      // individual id - convert to array for consistency.
      return [ids];
    } else if (ids && ids.skipObjectRetrieval) {
      return ids;
    }
  }
function normalizeIds ( ids ) { if ( _ . isArray ( ids ) ) { // remove any nesting of arrays - it is assumed that the resulting ids will be simple string or number values. ids = _ . flatten ( ids ) ; // remove any duplicate ids. return _ . uniq ( ids ) ; } else if ( _ . isString ( ids ) || _ . isNumber ( ids ) ) { // individual id - convert to array for consistency. return [ ids ] ; } else if ( ids && ids . skipObjectRetrieval ) { return ids ; } }
Converts string or number values into an array with a single string or number item.
If the input is not a string, number, array, or info about the ids then undefined is returned.
This is a private helper method used internally by this behavior and is not exposed in any way.
@param ids {String|Number|String[]|Number[]|Object} the ids to convert.
@param [ids.skipObjectRetrieval] {Boolean} set if this is a meta-info object about the ids.
@return {String[]|Number[]|Object} an array of strings or numbers.
@private
Converts string or number values into an array with a single string or number item . If the input is not a string number array or info about the ids then undefined is returned . This is a private helper method used internally by this behavior and is not exposed in any way .