namespaced-types

0.1.2 • Public • Published

Namespaced Types

npm version

Install

npm install namespaced-types

Usage

import createTypes from 'namespaced-types';
 
const types = createTypes('counter', [
  'INCREASE',
  'DECREASE'
]);

This would produce following object:

{
    INCREASE: 'counter/INCREASE',
    DECREASE: 'counter/DECREASE'
}

You can pass the third argument to change the default divider string '/'.

Readme

Keywords

Package Sidebar

Install

npm i namespaced-types

Weekly Downloads

13

Version

0.1.2

License

UNLICENSED

Last publish

Collaborators

  • kokororin