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

escape-json-node

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

escape-json-node

Escape nested double quotes and unescape apostrophes within JSON string.

  • 2.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
4.6K
decreased by-6.62%
Maintainers
1
Weekly downloads
 
Created
Source

⚠️ 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.

Keywords

FAQs

Package last updated on 12 Jan 2022

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