0.0.1 • Published 8 years ago
consto v0.0.1
consto
A way to define an object having the same value to its name attribute string
Consto stands for constant objects.
Installation
$ npm install --save consto
Usage
var consto = require('consto');
//Upper Style, default style
var co = consto(['rain', 'sea', 'key']);
>co.RAIN => 'RAIN'
>co.SEA => 'SEA',
>co.KEY => 'KEY'
//Free Style, by specifiy a true
var fs = consto(['Rain', 'sea', 'KEY'], true);
// > fs
// { Rain: 'Rain', sea: 'sea', KEY: 'KEY' }
License
MIT © calidion
0.0.1
8 years ago