namespaced-types
0.1.2 • Public • Published Namespaced Types
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 '/'.
Package Sidebar
Install
Weekly Downloads