0.0.1 • Published 8 years ago

consto v0.0.1

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

consto NPM version Build Status Dependency Status Coverage percentage

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