konst
v0.1.1
Published
Just like React's `keyMirror` module, but takes an array as input instead.
Downloads
6
Maintainers
Readme
konst.js
Just like React’s
keyMirror
module, but takes an array as input instead.
Usage
'use strict';
var konst = require('konst');
konst(['FOO', 'BAR', 'BAZ']);
//=> {
// FOO: 'FOO',
// BAR: 'BAR',
// BAZ: 'BAZ'
// }
API
var konst = require('konst');
konst(constants)
Returns an object where each key equals its value. Uses values from the given constants
array.
Installation
Install via npm:
$ npm i --save konst
Changelog
- 0.1.0
- Initial release