0.1.1 • Published 10 years ago

konst v0.1.1

Weekly downloads
2
License
MIT
Repository
github
Last release
10 years ago

konst.js npm Version Build Status Coverage Status

Just like Reacts 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

License

MIT