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

@webassemblyjs/helper-wasm-bytecode

Package Overview
Dependencies
Maintainers
1
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@webassemblyjs/helper-wasm-bytecode - npm Package Compare versions

Comparing version 1.1.2-y.6 to 1.1.2-y.7

15

lib/index.js

@@ -6,2 +6,5 @@ var illegalop = "illegal";

function invertMap(obj) {
var keyModifierFn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (k) {
return k;
};
var result = {};

@@ -11,3 +14,3 @@ var keys = Object.keys(obj);

for (var i = 0, length = keys.length; i < length; i++) {
result[obj[keys[i]]] = keys[i];
result[keyModifierFn(obj[keys[i]])] = keys[i];
}

@@ -296,2 +299,9 @@

};
var symbolsByName = invertMap(symbolsByByte, function (obj) {
if (typeof obj.object === "string") {
return "".concat(obj.object, ".").concat(obj.name);
}
return obj.name;
});
module.exports = {

@@ -312,3 +322,4 @@ symbolsByByte: symbolsByByte,

globalTypesByString: globalTypesByString,
exportTypesByName: exportTypesByName
exportTypesByName: exportTypesByName,
symbolsByName: symbolsByName
};

2

package.json
{
"name": "@webassemblyjs/helper-wasm-bytecode",
"version": "1.1.2-y.6",
"version": "1.1.2-y.7",
"description": "WASM's Bytecode constants",

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

@@ -6,7 +6,7 @@ const illegalop = "illegal";

function invertMap(obj) {
function invertMap(obj, keyModifierFn = k => k) {
const result = {};
const keys = Object.keys(obj);
for (let i = 0, length = keys.length; i < length; i++) {
result[obj[keys[i]]] = keys[i];
result[keyModifierFn(obj[keys[i]])] = keys[i];
}

@@ -321,2 +321,10 @@ return result;

const symbolsByName = invertMap(symbolsByByte, obj => {
if (typeof obj.object === "string") {
return `${obj.object}.${obj.name}`;
}
return obj.name;
});
module.exports = {

@@ -337,3 +345,4 @@ symbolsByByte,

globalTypesByString,
exportTypesByName
exportTypesByName,
symbolsByName
};
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