Socket
Socket
Sign inDemoInstall

safe-stable-stringify

Package Overview
Dependencies
0
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.3.0 to 2.3.1

4

CHANGELOG.md
# Changelog
## v2.3.1
- Fix `invalid regexp group` error in browsers or environments that do not support the negative lookbehind regular expression assertion.
## v2.3.0

@@ -4,0 +8,0 @@

8

index.js

@@ -21,5 +21,5 @@ 'use strict'

// eslint-disable-next-line
const strEscapeSequencesRegExp = /[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?<![\ud800-\udbff])[\udc00-\udfff]/
const strEscapeSequencesRegExp = /[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/
// eslint-disable-next-line
const strEscapeSequencesReplacer = /[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?<![\ud800-\udbff])[\udc00-\udfff]/g
const strEscapeSequencesReplacer = /[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/g

@@ -44,2 +44,6 @@ // Escaped special characters. Use empty strings to fill up unused entries.

function escapeFn (str) {
if (str.length === 2) {
const charCode = str.charCodeAt(1)
return `${str[0]}\\u${charCode.toString(16)}`
}
const charCode = str.charCodeAt(0)

@@ -46,0 +50,0 @@ return meta.length > charCode

{
"name": "safe-stable-stringify",
"version": "2.3.0",
"version": "2.3.1",
"description": "Deterministic and safely JSON.stringify to quickly serialize JavaScript objects",

@@ -5,0 +5,0 @@ "exports": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc