Skip to content
This repository has been archived by the owner on Mar 11, 2018. It is now read-only.
/ konst Public archive

Just like React’s `keyMirror` module, but takes an array as input instead.

License

Notifications You must be signed in to change notification settings

yuanqing/konst

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

konst.js npm Version Build Status Coverage Status

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

License

MIT

About

Just like React’s `keyMirror` module, but takes an array as input instead.

Resources

License

Stars

Watchers

Forks

Packages

No packages published