Skip to content
Mirroring to keys and values from array of strings
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.babelrc
.eslintrc
.gitignore
.travis.yml
README.md
package.json
test.js

README.md

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

You can’t perform that action at this time.