Socket
Socket
Sign inDemoInstall

js-string-escape

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-string-escape

Escape strings for use as JavaScript string literals


Version published
Weekly downloads
2.3M
decreased by-19.91%
Maintainers
1
Weekly downloads
 
Created

What is js-string-escape?

The js-string-escape npm package is a utility for escaping JavaScript strings. It ensures that special characters in strings are properly escaped, making them safe for use in JavaScript code.

What are js-string-escape's main functionalities?

Basic String Escaping

This feature allows you to escape special characters in a string, such as quotes, backslashes, and newlines, making the string safe for use in JavaScript code.

const jsStringEscape = require('js-string-escape');
const escapedString = jsStringEscape('Hello "world"!');
console.log(escapedString); // Output: Hello \"world\"!

Other packages similar to js-string-escape

Keywords

FAQs

Package last updated on 11 Mar 2016

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