Socket
Socket
Sign inDemoInstall

@webassemblyjs/ast

Package Overview
Dependencies
Maintainers
1
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@webassemblyjs/ast - npm Package Compare versions

Comparing version 1.2.2 to 1.2.3

32

lib/index.js

@@ -24,5 +24,7 @@ "use strict";

exports.numberLiteral = numberLiteral;
exports.getUniqueNameGenerator = getUniqueNameGenerator;
exports.callInstruction = callInstruction;
exports.ifInstruction = ifInstruction;
exports.withLoc = withLoc;
exports.withRaw = withRaw;
exports.moduleImport = moduleImport;

@@ -49,2 +51,3 @@ exports.globalImportDescr = globalImportDescr;

exports.indexInFuncSection = indexInFuncSection;
exports.isAnonymous = isAnonymous;
Object.defineProperty(exports, "traverse", {

@@ -390,2 +393,17 @@ enumerable: true,

function getUniqueNameGenerator() {
var inc = {};
return function () {
var prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "temp";
if (!(prefix in inc)) {
inc[prefix] = 0;
} else {
inc[prefix] = inc[prefix] + 1;
}
return prefix + "_" + inc[prefix];
};
}
function callInstruction(index, instrArgs) {

@@ -418,3 +436,7 @@ assert(typeof index.type === "string");

}
/**
* Decorators
*/
function withLoc(n, end, start) {

@@ -428,2 +450,8 @@ var loc = {

}
function withRaw(n, raw) {
// $FlowIgnore
n.raw = raw;
return n;
}
/**

@@ -615,2 +643,6 @@ * Import

};
}
function isAnonymous(ident) {
return ident.raw === "";
}

7

package.json
{
"name": "@webassemblyjs/ast",
"version": "1.2.2",
"version": "1.2.3",
"description": "AST utils for webassemblyjs",

@@ -14,5 +14,4 @@ "keywords": [

"dependencies": {
"@webassemblyjs/wast-parser": "1.2.2",
"webassembly-floating-point-hex-parser": "0.1.2",
"webassemblyjs": "1.2.2"
"@webassemblyjs/wast-parser": "1.2.3",
"webassemblyjs": "1.2.3"
},

@@ -19,0 +18,0 @@ "repository": {

@@ -335,2 +335,14 @@ // @flow

export function getUniqueNameGenerator(): string => string {
const inc = {};
return function(prefix: string = "temp"): string {
if (!(prefix in inc)) {
inc[prefix] = 0;
} else {
inc[prefix] = inc[prefix] + 1;
}
return prefix + "_" + inc[prefix];
};
}
export function callInstruction(

@@ -375,2 +387,6 @@ index: Index,

/**
* Decorators
*/
export function withLoc(n: Node, end: Position, start: Position): Node {

@@ -387,2 +403,9 @@ const loc = {

export function withRaw(n: Node, raw: string): Node {
// $FlowIgnore
n.raw = raw;
return n;
}
/**

@@ -611,2 +634,6 @@ * Import

export function isAnonymous(ident: Identifier): boolean {
return ident.raw === "";
}
export { traverse, traverseWithHooks } from "./traverse";

@@ -613,0 +640,0 @@ export { signatures } from "./signatures";

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