1.0.0 • Published 8 years ago

feathers-action-types v1.0.0

Weekly downloads
1
License
ISC
Repository
github
Last release
8 years ago

feathers-action-types NPM version

flux action types for feathers services

(Table of contents generated by verb)

Install

Install with npm

$ npm i feathers-action-types --save

Usage

var createActionTypes = require('feathers-action-types');

API

createActionTypes

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,
// }

Related projects

action-names: Standard actions names for Flux | homepage

Running tests

Install dev dependencies:

$ npm i -d && npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Author

Mikey

License

Copyright © 2015 Mikey Released under the ISC license.


This file was generated by verb-cli on November 30, 2015.