flux action types for feathers services
(Table of contents generated by verb)
Install with npm
$ npm i feathers-action-types --save
var createActionTypes = require('feathers-action-types');
Given a resource name, returns respective feathers action types.
Action types are represented as an object mapping action type constants and aliases to action type constants.
Params
resource
{String}returns
{Object}actionTypes
Example
createActionTypes('users')
// => {
// USERS_FIND_START: USERS_FIND_START,
// USERS_FIND_SUCCESS: USERS_FIND_SUCCESS,
// USERS_FIND_ERROR: USERS_FIND_ERROR,
// findStart: USERS_FIND_START,
// findSuccess: USERS_FIND_SUCCESS,
// findError: USERS_FIND_ERROR,
// USERS_GET_START: USERS_GET_START,
// ...
// USERS_CREATE_START: USERS_CREATE_START,
// ...
// USERS_UPDATE_START: USERS_UPDATE_START,
// ...
// USERS_PATCH_START: USERS_PATCH_START,
// ...
// USERS_REMOVE_START: USERS_REMOVE_START,
// USERS_REMOVE_SUCCESS: USERS_REMOVE_SUCCESS,
// USERS_REMOVE_ERROR: USERS_REMOVE_ERROR,
// removeStart: USERS_REMOVE_START,
// removeSuccess: USERS_REMOVE_SUCCESS,
// removeError: USERS_REMOVE_ERROR,
// }
action-names: Standard actions names for Flux | homepage
Install dev dependencies:
$ npm i -d && npm test
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Mikey
Copyright © 2015 Mikey Released under the ISC license.
This file was generated by verb-cli on November 30, 2015.