0.1.2 • Published 7 years ago

namespaced-types v0.1.2

Weekly downloads
4
License
UNLICENSED
Repository
github
Last release
7 years ago

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 '/'.