mirror-key-value
v1.0.5
Published
Mirroring to keys and values from array of strings
Downloads
45
Maintainers
Readme
mirror-key-value
Mirroring to keys and values from array of strings
npm i mirror-key-value
Usage
import mirrorKeyValue from 'mirror-key-value';
mirrorKeyValue(['val1', 'val2']); // => { val1: 'val1', val2: 'val2' }
Create action types of Flux application as an example use
// action-types.js
export default mirrorKeyValue([
'ADD_TODO',
'DELETE_TODO',
'CHANGE_COMPLETE'
]);
//
import types from './constants/action-types';
Contributing
- Fork it!
- Create your feature branch: git checkout -b my-new-feature
- Commit your changes: git commit -am 'Add some feature'
- Push to the branch: git push origin my-new-feature
- Submit a pull request :D
License
© sugarshin