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

code-red

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

code-red - npm Package Compare versions

Comparing version 0.0.22 to 0.0.23

types/utils/id.d.ts

4

CHANGELOG.md
# code-red changelog
## 0.0.23
* Unescape sigils in literals ([#16](https://github.com/Rich-Harris/code-red/pull/16))
## 0.0.22

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

14

dist/code-red.js

@@ -7,2 +7,6 @@ (function (global, factory) {

// generate an ID that is, to all intents and purposes, unique
const id = (Math.round(Math.random() * 1e20)).toString(36);
const re = new RegExp(`_${id}_(?:(\\d+)|(AT)|(HASH))_(\\w+)?`, 'g');
function handle(node, state) {

@@ -1285,3 +1289,7 @@ const handler = handlers[node.type];

// str.replace(/\\u(\d{4})/g, (m, n) => String.fromCharCode(+n))
c(JSON.stringify(node.value), node)
c(JSON.stringify(node.value).replace(re, (_m, _i, at, hash, name) => {
if (at) return '@' + name;
if (hash) return '#' + name;
throw new Error(`this shouldn't happen`);
}), node)
];

@@ -1387,6 +1395,2 @@ }

// generate an ID that is, to all intents and purposes, unique
const id = (Math.round(Math.random() * 1e20)).toString(36);
const re = new RegExp(`_${id}_(?:(\\d+)|(AT)|(HASH))_(\\w+)?`, 'g');
const sigils = {

@@ -1393,0 +1397,0 @@ '@': 'AT',

{
"name": "code-red",
"description": "code-red",
"version": "0.0.22",
"version": "0.0.23",
"repository": "Rich-Harris/code-red",

@@ -6,0 +6,0 @@ "main": "dist/code-red.js",

Sorry, the diff of this file is not supported yet

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