nvp-json

1.1.2 • Public • Published

nvp-json

npm version Build Status npm downloads Codacy Coverage

dependencies Build Status GitKraken

A bi-directional NVP-JSON parser, for use with PayPal's NVP APIs.

Tested with Node >= 6 LTS.

Installation

npm install nvp-json

or

yarn add nvp-json

Usage

const nvpjson = require('nvp-json');
let nvpString = 'KEY=VALUE&ESCAPED[5]=& [1]=';

let json = nvpjson.toJSON(nvpString);

/*
 * {KEY: 'VALUE', ESCAPED: '& [1]='}
 */

let nvp = nvpjson.toNVP({
    KEY: 'VALUE',
    ESCAPED: '& [1]='
});

/*
 * KEY=VALUE&ESCAPED[5]=& [1]=
 */

License

MIT

Package Sidebar

Install

npm i nvp-json

Weekly Downloads

13

Version

1.1.2

License

MIT

Unpacked Size

7.49 kB

Total Files

9

Last publish

Collaborators

  • carriejv