@webassemblyjs/wasm-parser
Advanced tools
Comparing version 1.0.0-y.7 to 1.0.0-y.8
@@ -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 |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
18
0
105702
16
3269
+ Added@webassemblyjs/ast@1.0.0-y.8(transitive)
+ Added@webassemblyjs/wast-parser@1.0.0-y.8(transitive)
+ Addedwebassemblyjs@1.0.0-y.8(transitive)
- Removed@webassemblyjs/ast@1.0.0-y.7(transitive)
- Removed@webassemblyjs/wast-parser@1.0.0-y.7(transitive)
- Removedwebassemblyjs@1.0.0-y.7(transitive)
Updated@webassemblyjs/ast@1.0.0-y.8
Updatedwebassemblyjs@1.0.0-y.8