Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

parse-keys

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parse-keys - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

4

index.js

@@ -12,3 +12,5 @@ 'use strict';

result[key] = JSON.parse(value)
try { value = JSON.parse(value) } catch (ex){ }
result[key] = value
})

@@ -15,0 +17,0 @@

{
"name": "parse-keys",
"version": "1.0.0",
"version": "1.1.0",
"description": "JSON.parse only object keys",

@@ -5,0 +5,0 @@ "main": "index.js",

# parse-keys
JSON.parse only object keys
## Install
```sh
$ npm i parse--keys --save
```
## Usage
```js
//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
```
```sh
$ PORT=4000
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc