Skip to content
This repository has been archived by the owner on Jun 6, 2022. It is now read-only.

ahdinosaur/feathers-action-types

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

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.

About

flux action types for feathers services

Resources

Stars

Watchers

Forks

Packages

No packages published