parse-keys

JSON.parse only object keys

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
parse-keys
001.3.09 years ago9 years agoMinified + gzip package size for parse-keys in KB

Readme

parse-keys
JSON.parse only object keys

Install

$ npm i parse--keys --save

Usage

//server.js
'use strict'

var parse = require('parse-keys');
var env = parse(process.env, ['PORT']);

console.log(process.env.PORT) === "4000"
//while
console.log(env.PORT) === 4000

$ PORT=4000 node server.js

License

MIT