Socket
Socket
Sign inDemoInstall

acorn-import-assertions

Package Overview
Dependencies
1
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.7.5 to 1.7.6

8

lib/index.js

@@ -10,4 +10,2 @@ "use strict";

var _charcodes = require("charcodes");
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }

@@ -17,2 +15,4 @@

const leftCurlyBrace = "{".charCodeAt(0);
const space = " ".charCodeAt(0);
const keyword = "assert";

@@ -64,6 +64,6 @@ const FUNC_STATEMENT = 1,

for (;; i++) {
if (this._codeAt(this.pos + i) === _charcodes.leftCurlyBrace) {
if (this._codeAt(this.pos + i) === leftCurlyBrace) {
// Found '{'
break;
} else if (this._codeAt(this.pos + i) === _charcodes.space) {
} else if (this._codeAt(this.pos + i) === space) {
// white space is allowed between `assert` and `{`, so continue.

@@ -70,0 +70,0 @@ continue;

{
"name": "acorn-import-assertions",
"version": "1.7.5",
"version": "1.7.6",
"description": "Support for import assertions in acorn",

@@ -38,5 +38,3 @@ "main": "lib/index.js",

},
"dependencies": {
"charcodes": "^0.2.0"
},
"dependencies": {},
"browserslist": [

@@ -43,0 +41,0 @@ "maintained node versions"

import * as _acorn from "acorn";
import { leftCurlyBrace, space } from "charcodes";
const leftCurlyBrace = "{".charCodeAt(0);
const space = " ".charCodeAt(0);
const keyword = "assert";

@@ -5,0 +7,0 @@ const FUNC_STATEMENT = 1, FUNC_HANGING_STATEMENT = 2, FUNC_NULLABLE_ID = 4

Sorry, the diff of this file is not supported yet

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