Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
@babel/plugin-proposal-json-strings
Advanced tools
Package description
The @babel/plugin-proposal-json-strings package is a plugin for Babel that allows you to use the JSON strings proposal in your JavaScript code. This proposal makes it possible to write escape sequences for line separators (\u2028) and paragraph separators (\u2029) within string literals, which are otherwise not allowed in JSON. This can be useful when dealing with JSON data that may include these characters.
JSON Strings Proposal Support
This feature allows you to include line and paragraph separators in your JSON strings, which are part of the ECMAScript 2019 (ES10) specification. The plugin transforms these literals into valid JavaScript strings.
"This is a JSON string with a line separator: \u2028 and a paragraph separator: \u2029"
This Babel plugin transforms Unicode text into escaped ASCII form, which can be useful for avoiding encoding issues or for representing non-printable characters in a readable format. It is similar to @babel/plugin-proposal-json-strings in that it deals with string encoding, but it is more general in its approach.
JSON5 is a JS library and npm package that allows for the parsing and serialization of a superset of JSON that includes features from ECMAScript 5. It is similar to @babel/plugin-proposal-json-strings in that it allows for a more flexible JSON format, including unquoted keys, single quotes, and trailing commas.
Changelog
v7.17.12 (2022-05-16)
babel-plugin-transform-react-constant-elements
babel-generator
babel-plugin-transform-destructuring
babel-parser
babel-parser
, babel-plugin-transform-destructuring
, babel-types
babel-plugin-proposal-decorators
, babel-types
babel-core
babel-core
, babel-generator
, babel-helper-create-class-features-plugin
, babel-helper-create-regexp-features-plugin
, babel-helper-module-transforms
, babel-helper-plugin-utils
, babel-parser
, babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression
, babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining
, babel-plugin-external-helpers
, babel-plugin-proposal-async-do-expressions
, babel-plugin-proposal-async-generator-functions
, babel-plugin-proposal-class-properties
, babel-plugin-proposal-class-static-block
, babel-plugin-proposal-decorators
, babel-plugin-proposal-export-default-from
, babel-plugin-proposal-export-namespace-from
, babel-plugin-proposal-function-sent
, babel-plugin-proposal-json-strings
, babel-plugin-proposal-logical-assignment-operators
, babel-plugin-proposal-nullish-coalescing-operator
, babel-plugin-proposal-object-rest-spread
, babel-plugin-proposal-optional-chaining
, babel-plugin-proposal-partial-application
, babel-plugin-proposal-pipeline-operator
, babel-plugin-proposal-private-methods
, babel-plugin-proposal-private-property-in-object
, babel-plugin-proposal-record-and-tuple
, babel-plugin-proposal-unicode-property-regex
, babel-plugin-syntax-decorators
, babel-plugin-syntax-destructuring-private
, babel-plugin-syntax-flow
, babel-plugin-syntax-import-assertions
, babel-plugin-syntax-pipeline-operator
, babel-plugin-syntax-record-and-tuple
, babel-plugin-syntax-typescript
, babel-plugin-transform-arrow-functions
, babel-plugin-transform-async-to-generator
, babel-plugin-transform-block-scoping
, babel-plugin-transform-classes
, babel-plugin-transform-computed-properties
, babel-plugin-transform-destructuring
, babel-plugin-transform-duplicate-keys
, babel-plugin-transform-flow-comments
, babel-plugin-transform-flow-strip-types
, babel-plugin-transform-for-of
, babel-plugin-transform-instanceof
, babel-plugin-transform-jscript
, babel-plugin-transform-literals
, babel-plugin-transform-modules-amd
, babel-plugin-transform-modules-commonjs
, babel-plugin-transform-modules-systemjs
, babel-plugin-transform-modules-umd
, babel-plugin-transform-named-capturing-groups-regex
, babel-plugin-transform-new-target
, babel-plugin-transform-parameters
, babel-plugin-transform-property-mutators
, babel-plugin-transform-proto-to-assign
, babel-plugin-transform-react-constant-elements
, babel-plugin-transform-react-jsx
, babel-plugin-transform-reserved-words
, babel-plugin-transform-runtime
, babel-plugin-transform-spread
, babel-plugin-transform-template-literals
, babel-plugin-transform-typeof-symbol
, babel-plugin-transform-typescript
, babel-preset-env
, babel-preset-flow
, babel-preset-react
, babel-preset-typescript
, babel-traverse
, babel-types
Readme
Escape U+2028 LINE SEPARATOR and U+2029 PARAGRAPH SEPARATOR in JS strings
See our website @babel/plugin-proposal-json-strings for more information.
Using npm:
npm install --save-dev @babel/plugin-proposal-json-strings
or using yarn:
yarn add @babel/plugin-proposal-json-strings --dev
FAQs
Escape U+2028 LINE SEPARATOR and U+2029 PARAGRAPH SEPARATOR in JS strings
The npm package @babel/plugin-proposal-json-strings receives a total of 6,780,920 weekly downloads. As such, @babel/plugin-proposal-json-strings popularity was classified as popular.
We found that @babel/plugin-proposal-json-strings demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
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.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.