index.js
function normalizeEntities(base, input) {
  if (!input) return;
  if (!Array.isArray(input)) input = [ input ];

  return flatten(input).filter(Boolean).map(function (entity) {
    assert(entity.rel, 'sub-entities must have a rel');

    var ret = normalizeEntity(base, entity);
    ret.rel = normalizeRel(base, entity.rel);
    if (entity.href) ret.href = normalizeHref(base, entity.href);

    return ret;
  });
}
function normalizeEntities(base, input) {
  if (!input) return;
  if (!Array.isArray(input)) input = [ input ];

  return flatten(input).filter(Boolean).map(function (entity) {
    assert(entity.rel, 'sub-entities must have a rel');

    var ret = normalizeEntity(base, entity);
    ret.rel = normalizeRel(base, entity.rel);
    if (entity.href) ret.href = normalizeHref(base, entity.href);

    return ret;
  });
}
function normalizeEntities ( base , input ) { if ( ! input ) return ; if ( ! Array . isArray ( input ) ) input = [ input ] ; return flatten ( input ) . filter ( Boolean ) . map ( function ( entity ) { assert ( entity . rel , 'sub-entities must have a rel' ) ; var ret = normalizeEntity ( base , entity ) ; ret . rel = normalizeRel ( base , entity . rel ) ; if ( entity . href ) ret . href = normalizeHref ( base , entity . href ) ; return ret ; } ) ; }
Takes the `input` entities value and normalizes it into a single array.

@param {String} base  The base URL for this API.
@param {Mixed} input  The entities value to normalize.
@return {Array}
Takes the input entities value and normalizes it into a single array .