JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3907
  • Score
    100M100P100Q11570F
  • License MIT

Escape nested double quotes and unescape apostrophes within JSON string.

Package Exports

  • escape-json-node
  • escape-json-node/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (escape-json-node) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

⚠️ This package is deprecated.

escape-json-node Logo

Escape nested double quotes and unescape apostrophes within JSON string.

NPM Package Version NPM Package Downloads NPM Package License

Installation

npm install escape-json-node

Usage Example

var escapeJSON = require('escape-json-node');

var JSONString = '{"quoteText": "\'Acceptance says, "True, this is ' +
'my situation at the moment. I\'ll look unblinkingly at the reality of it. ' +
'But I will also open my hands to accept willingly whatever a loving ' +
'Father sends me.""}';

JSONString = escapeJSON(JSONString);

console.log(JSONString);

{"quoteText": "'Acceptance says, \"True, this is my situation at the moment.
I'll look unblinkingly at the reality of it. But I will also open my
hands to accept willingly whatever a loving Father sends me.\""}

Tests

To run the test suite, first install the dependencies, then run npm test:

$ npm install
$ npm test

License

Distributed under the MIT License.