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

@webassemblyjs/wasm-parser

Package Overview
Dependencies
Maintainers
1
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@webassemblyjs/wasm-parser - npm Package Compare versions

Comparing version 1.0.0-y.7 to 1.0.0-y.8

12

lib/index.js

@@ -6,13 +6,13 @@ "use strict";

});
exports.parseBinary = parseBinary;
exports.decode = decode;
var _require = require("./decoder"),
decode = _require.decode;
var decoder = _interopRequireWildcard(require("./decoder"));
function parseBinary(buf) {
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
function decode(buf) {
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
dump = _ref.dump;
var ast = decode(buf, dump);
return ast;
return decoder.decode(buf, dump);
}

@@ -17,3 +17,3 @@ "use strict";

*
* Changes made by the xtuc/js-webassembly-interpreter contributors:
* Changes made by the xtuc/webassemblyjs contributors:
* - refactor: move alls functions into one file and remove the unused functions

@@ -20,0 +20,0 @@ * - feat: added some constants

{
"name": "@webassemblyjs/wasm-parser",
"version": "1.0.0-y.7",
"version": "1.0.0-y.8",
"keywords": [

@@ -19,9 +19,9 @@ "webassembly",

"dependencies": {
"@webassemblyjs/ast": "1.0.0-y.7",
"@webassemblyjs/wasm-parser": "1.0.0-y.7",
"webassemblyjs": "1.0.0-y.7"
"@webassemblyjs/ast": "1.0.0-y.8",
"@webassemblyjs/wasm-parser": "1.0.0-y.8",
"webassemblyjs": "1.0.0-y.8"
},
"repository": {
"type": "git",
"url": "https://github.com/xtuc/js-webassembly-interpreter.git"
"url": "https://github.com/xtuc/webassemblyjs.git"
},

@@ -28,0 +28,0 @@ "publishConfig": {

@@ -1,3 +0,17 @@

# @webassembly/wasm-parser
# @webassemblyjs/wasm-parser
> WebAssembly binary format parser
## Installation
```sh
npm install @webassemblyjs/wasm-parser
```
## Usage
```js
import { decode } from "@webassemblyjs/wasm-parser";
const ast = decode(binary);
```
// @flow
const { decode } = require("./decoder");
import * as decoder from "./decoder";

@@ -9,5 +9,4 @@ type Opts = {

export function parseBinary(buf: ArrayBuffer, { dump }: Opts = {}): Program {
const ast = decode(buf, dump);
return ast;
export function decode(buf: ArrayBuffer, { dump }: Opts = {}): Program {
return decoder.decode(buf, dump);
}

@@ -6,3 +6,3 @@ /**

*
* Changes made by the xtuc/js-webassembly-interpreter contributors:
* Changes made by the xtuc/webassemblyjs contributors:
* - refactor: move alls functions into one file and remove the unused functions

@@ -9,0 +9,0 @@ * - feat: added some constants

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