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

key-value-parser

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

key-value-parser

key value parser

  • 0.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
70
increased by29.63%
Maintainers
1
Weekly downloads
 
Created
Source

Key Value Parser

Simple nodejs library to do key=value parsing for lines that look like:

a=apple b=babycakes d="dog smiles"

Installation

$ npm install key-value-parser 

Usage

Example


var KeyValueParser = require('key-value-parser');

var line = 'hello=you big="beautiful" bear=friend'

var parser = new KeyValueParser(line, { quoted: '\"' }); 

parser.on('end', function(data) {
  console.log("got:", data);
});

// ouputs: { hello: 'you', big: 'beautiful and lovely', bear: 'friend' }

Debug logging

pass in DEBUG=key-value-parser as an environment variable to turn on debug logging.

License

Copyright (C) 2013 Jen Andre jandre@gmail.com

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

FAQs

Package last updated on 16 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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