jsesc
npmv3.1.0Given some data, jsesc returns the shortest possible stringified & ASCII-safe representation of that data.
Overview
jsesc is an npm package that given some data, jsesc returns the shortest possible stringified & ASCII-safe representation of that data. The latest version is 3.1.0, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need given some data, jsesc returns the shortest possible stringified & ASCII-safe representation of that data and value a focused solution.
When not to use it
Consider an alternative if you need to have first-class TypeScript types out of the box, or if a more actively-maintained option better fits your npm stack.
Pros
- Clear open-source license (MIT).
Cons
- No bundled TypeScript types (may require a separate @types package).
Auto-generated from collected registry metadata. No external claims are inferred.
Relationship graph
Dependencies (left) and dependents (right) of jsesc.
Dependencies
Dev (9)
Used by
Popular packages that depend on jsesc.
Alternatives to jsesc
Stringify your JSON at max speed
Get the real length of a string - by correctly counting astral symbols and ignoring ansi escape codes
deterministic `JSON.stringify()` - a faster version of substack's json-stable-strigify without jsonify
Set a function's length property
Escape RegExp special characters
deterministic JSON.stringify() with custom sorting to get deterministic hashes from stringified results, with no public domain dependencies
Parse JSON with more helpful errors
prelude.ls is a functionally oriented utility library. It is powerful and flexible. Almost all of its functions are curried. It is written in, and is the recommended base library for, LiveScript.
Get the visual width of a string - the number of columns required to display it
Is this value a JS SharedArrayBuffer?
Is this value a JS Map? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
Is this value a JS Set? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
Frequently installed together
Trace the original position through a source map
Encode/decode sourcemap mappings
Generate source maps
A JavaScript parser
Babel Types is a Lodash-esque utility library for AST nodes
TypeScript definitions for jsesc
Transform TypeScript into ES.next
Version history
| Version | Published | License |
|---|---|---|
| 3.1.0latest | 1 year ago | MIT |
| 3.0.2 | 5 years ago | MIT |
| 3.0.1 | 6 years ago | MIT |
| 3.0.0 | 6 years ago | MIT |
| 2.5.2 | 7 years ago | MIT |
| 2.5.1 | 9 years ago | MIT |
| 2.5.0 | 9 years ago | MIT |
| 2.4.0 | 9 years ago | MIT |
| 2.3.0 | 9 years ago | MIT |
| 2.2.0 | 10 years ago | MIT |
| 2.1.0 | 10 years ago | MIT |
| 2.0.0 | 10 years ago | MIT |
| 1.3.0 | 10 years ago | MIT |
| 1.2.1 | 10 years ago | MIT |
| 1.2.0 | 10 years ago | MIT |
| 1.1.0 | 10 years ago | MIT |
| 1.0.0 | 10 years ago | MIT |
| 0.5.0 | 12 years ago | MIT |
| 0.4.3 | 12 years ago | MIT |
| 0.4.2 | 13 years ago | MIT |
Maintainers
Frequently asked questions
How do I install jsesc?
Run `npm install jsesc` to add jsesc to your npm project.
What license is jsesc released under?
jsesc is distributed under the MIT license.
How popular is jsesc?
jsesc has approximately 0 downloads per week and 1 known dependent packages.