UNPKG

@logux/actions

Version:

Types and action creators for build-in Logux actions

11 lines (10 loc) 223 B
export function defineAction(type, creator) { if (!creator) { creator = fields => { return { type, ...fields } } } creator.type = type creator.match = action => action.type === type return creator }