src/entity/ActionType.js
/**
 * Curry normalizeArguments with action type id. Converts single resource path
 * (e.g. /actions/_custom) into plural with filter
 * (e.g. /actions?filter=name=_custom).
 *
 * @param {String} id - ID of action type
 * @return {Function} Normalize arguments transformer.
 */
Curry normalizeArguments with action type id. Converts single resource path
into plural with filter
.

@param {String} id - ID of action type
@return {Function} Normalize arguments transformer.
Curry normalizeArguments with action type id . Converts single resource path into plural with filter . @param { String } id - ID of action type @return { Function } Normalize arguments transformer .
function normalizeArguments (id) {
  return (...args) => {
    let options
    const firstArg = args[0]
    if (isUndefined(firstArg) || isFunction(firstArg)) {
      options = {}
      args.unshift(options)
    } else {
      options = firstArg
    }
    options.url = path
    options.params = Object.assign({ filter: { name: decodeURIComponent(id) } }, options.params)
    return args
  }
}
function normalizeArguments ( id ) { return ( ... args ) => { let options const firstArg = args [ 0 ] if ( isUndefined ( firstArg ) || isFunction ( firstArg ) ) { options = { } args . unshift ( options ) } else { options = firstArg } options . url = path options . params = Object . assign ( { filter : { name : decodeURIComponent ( id ) } } , options . params ) return args } }
Curry normalizeArguments with action type id.
Curry normalizeArguments with action type id .