index.js
function normalizeAction(base, input) {
  assert(input.name, 'actions must have a name');
  assert(input.href, 'actions must have an href');

  var ret = clone(input);

  ret.href = normalizeHref(base, input.href);
  if (input.method) ret.method = normalizeMethod(input.method);

  var cls = normalizeClass(input.class);
  if (cls) ret.class = cls;

  var fields = normalizeFields(input.fields);
  if (fields) ret.fields = fields;

  return ret;
}
function normalizeAction(base, input) {
  assert(input.name, 'actions must have a name');
  assert(input.href, 'actions must have an href');

  var ret = clone(input);

  ret.href = normalizeHref(base, input.href);
  if (input.method) ret.method = normalizeMethod(input.method);

  var cls = normalizeClass(input.class);
  if (cls) ret.class = cls;

  var fields = normalizeFields(input.fields);
  if (fields) ret.fields = fields;

  return ret;
}
function normalizeAction ( base , input ) { assert ( input . name , 'actions must have a name' ) ; assert ( input . href , 'actions must have an href' ) ; var ret = clone ( input ) ; ret . href = normalizeHref ( base , input . href ) ; if ( input . method ) ret . method = normalizeMethod ( input . method ) ; var cls = normalizeClass ( input . class ) ; if ( cls ) ret . class = cls ; var fields = normalizeFields ( input . fields ) ; if ( fields ) ret . fields = fields ; return ret ; }
Takes the `input` action value and normalizes it into a single object.

@param {String} base   The base URL for this API.
@param {Object} input  The action value to normalize.
@return {Object}
Takes the input action value and normalizes it into a single object .