1.0.5 • Published 8 years ago

mirror-key-value v1.0.5

Weekly downloads
85
License
MIT
Repository
github
Last release
8 years ago

mirror-key-value

Build Status Dependency Status Devdependency Status npm version License

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

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

License

MIT

© sugarshin