redux-action-type-validator

1.1.0 • Public • Published

npm version Build Status codecov Dependency Status devDependency Status

redux-action-type-validator

Type validator for redux actions

Installation

npm i --save redux-action-type-validator

Usage

import {list, String} from "tcomb";
 
const typeofAction = actionTypeValidator(list(String));
 
export function action (payload) {
    typeofSelectSite(...arguments);
    return {
        type: "ACTION_TYPE",
        payload
    };
}
 
// Somewhere in your code
action(["some", "string", "here"]); // not throw
 
action("some"); // throw
 
 

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.0
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.1.0
    0
  • 1.0.2
    0
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i redux-action-type-validator

Weekly Downloads

0

Version

1.1.0

License

Apache-2.0

Last publish

Collaborators

  • davidebianchi