diff options
Diffstat (limited to 'node_modules/@webassemblyjs/helper-buffer')
6 files changed, 0 insertions, 362 deletions
diff --git a/node_modules/@webassemblyjs/helper-buffer/LICENSE b/node_modules/@webassemblyjs/helper-buffer/LICENSE deleted file mode 100644 index 87e7e1f..0000000 --- a/node_modules/@webassemblyjs/helper-buffer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2018 Sven Sauleau <sven@sauleau.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/@webassemblyjs/helper-buffer/esm/compare.js b/node_modules/@webassemblyjs/helper-buffer/esm/compare.js deleted file mode 100644 index 8cea6b3..0000000 --- a/node_modules/@webassemblyjs/helper-buffer/esm/compare.js +++ /dev/null @@ -1,65 +0,0 @@ -// this are dev dependencies -var diff = require("jest-diff"); - -var _require = require("jest-diff/build/constants"), - NO_DIFF_MESSAGE = _require.NO_DIFF_MESSAGE; - -var _require2 = require("@webassemblyjs/wasm-parser"), - decode = _require2.decode; - -var oldConsoleLog = console.log; -export function compareArrayBuffers(l, r) { - /** - * Decode left - */ - var bufferL = ""; - - console.log = function () { - for (var _len = arguments.length, texts = new Array(_len), _key = 0; _key < _len; _key++) { - texts[_key] = arguments[_key]; - } - - return bufferL += texts.join("") + "\n"; - }; - - try { - decode(l, { - dump: true - }); - } catch (e) { - console.error(bufferL); - console.error(e); - throw e; - } - /** - * Decode right - */ - - - var bufferR = ""; - - console.log = function () { - for (var _len2 = arguments.length, texts = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - texts[_key2] = arguments[_key2]; - } - - return bufferR += texts.join("") + "\n"; - }; - - try { - decode(r, { - dump: true - }); - } catch (e) { - console.error(bufferR); - console.error(e); - throw e; - } - - console.log = oldConsoleLog; - var out = diff(bufferL, bufferR); - - if (out !== null && out !== NO_DIFF_MESSAGE) { - throw new Error("\n" + out); - } -}
\ No newline at end of file diff --git a/node_modules/@webassemblyjs/helper-buffer/esm/index.js b/node_modules/@webassemblyjs/helper-buffer/esm/index.js deleted file mode 100644 index 2c35b9e..0000000 --- a/node_modules/@webassemblyjs/helper-buffer/esm/index.js +++ /dev/null @@ -1,67 +0,0 @@ -function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } - -function concatUint8Arrays() { - for (var _len = arguments.length, arrays = new Array(_len), _key = 0; _key < _len; _key++) { - arrays[_key] = arguments[_key]; - } - - var totalLength = arrays.reduce(function (a, b) { - return a + b.length; - }, 0); - var result = new Uint8Array(totalLength); - var offset = 0; - - for (var _i = 0; _i < arrays.length; _i++) { - var arr = arrays[_i]; - - if (arr instanceof Uint8Array === false) { - throw new Error("arr must be of type Uint8Array"); - } - - result.set(arr, offset); - offset += arr.length; - } - - return result; -} - -export function overrideBytesInBuffer(buffer, startLoc, endLoc, newBytes) { - var beforeBytes = buffer.slice(0, startLoc); - var afterBytes = buffer.slice(endLoc, buffer.length); // replacement is empty, we can omit it - - if (newBytes.length === 0) { - return concatUint8Arrays(beforeBytes, afterBytes); - } - - var replacement = Uint8Array.from(newBytes); - return concatUint8Arrays(beforeBytes, replacement, afterBytes); -} -export function makeBuffer() { - for (var _len2 = arguments.length, splitedBytes = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - splitedBytes[_key2] = arguments[_key2]; - } - - var bytes = [].concat.apply([], splitedBytes); - return new Uint8Array(bytes).buffer; -} -export function fromHexdump(str) { - var lines = str.split("\n"); // remove any leading left whitespace - - lines = lines.map(function (line) { - return line.trim(); - }); - var bytes = lines.reduce(function (acc, line) { - var cols = line.split(" "); // remove the offset, left column - - cols.shift(); - cols = cols.filter(function (x) { - return x !== ""; - }); - var bytes = cols.map(function (x) { - return parseInt(x, 16); - }); - acc.push.apply(acc, _toConsumableArray(bytes)); - return acc; - }, []); - return Buffer.from(bytes); -}
\ No newline at end of file diff --git a/node_modules/@webassemblyjs/helper-buffer/lib/compare.js b/node_modules/@webassemblyjs/helper-buffer/lib/compare.js deleted file mode 100644 index b30dc07..0000000 --- a/node_modules/@webassemblyjs/helper-buffer/lib/compare.js +++ /dev/null @@ -1,73 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.compareArrayBuffers = compareArrayBuffers; - -// this are dev dependencies -var diff = require("jest-diff"); - -var _require = require("jest-diff/build/constants"), - NO_DIFF_MESSAGE = _require.NO_DIFF_MESSAGE; - -var _require2 = require("@webassemblyjs/wasm-parser"), - decode = _require2.decode; - -var oldConsoleLog = console.log; - -function compareArrayBuffers(l, r) { - /** - * Decode left - */ - var bufferL = ""; - - console.log = function () { - for (var _len = arguments.length, texts = new Array(_len), _key = 0; _key < _len; _key++) { - texts[_key] = arguments[_key]; - } - - return bufferL += texts.join("") + "\n"; - }; - - try { - decode(l, { - dump: true - }); - } catch (e) { - console.error(bufferL); - console.error(e); - throw e; - } - /** - * Decode right - */ - - - var bufferR = ""; - - console.log = function () { - for (var _len2 = arguments.length, texts = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - texts[_key2] = arguments[_key2]; - } - - return bufferR += texts.join("") + "\n"; - }; - - try { - decode(r, { - dump: true - }); - } catch (e) { - console.error(bufferR); - console.error(e); - throw e; - } - - console.log = oldConsoleLog; - var out = diff(bufferL, bufferR); - - if (out !== null && out !== NO_DIFF_MESSAGE) { - throw new Error("\n" + out); - } -}
\ No newline at end of file diff --git a/node_modules/@webassemblyjs/helper-buffer/lib/index.js b/node_modules/@webassemblyjs/helper-buffer/lib/index.js deleted file mode 100644 index b735b1f..0000000 --- a/node_modules/@webassemblyjs/helper-buffer/lib/index.js +++ /dev/null @@ -1,78 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.overrideBytesInBuffer = overrideBytesInBuffer; -exports.makeBuffer = makeBuffer; -exports.fromHexdump = fromHexdump; - -function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } - -function concatUint8Arrays() { - for (var _len = arguments.length, arrays = new Array(_len), _key = 0; _key < _len; _key++) { - arrays[_key] = arguments[_key]; - } - - var totalLength = arrays.reduce(function (a, b) { - return a + b.length; - }, 0); - var result = new Uint8Array(totalLength); - var offset = 0; - - for (var _i = 0; _i < arrays.length; _i++) { - var arr = arrays[_i]; - - if (arr instanceof Uint8Array === false) { - throw new Error("arr must be of type Uint8Array"); - } - - result.set(arr, offset); - offset += arr.length; - } - - return result; -} - -function overrideBytesInBuffer(buffer, startLoc, endLoc, newBytes) { - var beforeBytes = buffer.slice(0, startLoc); - var afterBytes = buffer.slice(endLoc, buffer.length); // replacement is empty, we can omit it - - if (newBytes.length === 0) { - return concatUint8Arrays(beforeBytes, afterBytes); - } - - var replacement = Uint8Array.from(newBytes); - return concatUint8Arrays(beforeBytes, replacement, afterBytes); -} - -function makeBuffer() { - for (var _len2 = arguments.length, splitedBytes = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - splitedBytes[_key2] = arguments[_key2]; - } - - var bytes = [].concat.apply([], splitedBytes); - return new Uint8Array(bytes).buffer; -} - -function fromHexdump(str) { - var lines = str.split("\n"); // remove any leading left whitespace - - lines = lines.map(function (line) { - return line.trim(); - }); - var bytes = lines.reduce(function (acc, line) { - var cols = line.split(" "); // remove the offset, left column - - cols.shift(); - cols = cols.filter(function (x) { - return x !== ""; - }); - var bytes = cols.map(function (x) { - return parseInt(x, 16); - }); - acc.push.apply(acc, _toConsumableArray(bytes)); - return acc; - }, []); - return Buffer.from(bytes); -}
\ No newline at end of file diff --git a/node_modules/@webassemblyjs/helper-buffer/package.json b/node_modules/@webassemblyjs/helper-buffer/package.json deleted file mode 100644 index 815adee..0000000 --- a/node_modules/@webassemblyjs/helper-buffer/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "_from": "@webassemblyjs/helper-buffer@1.9.0", - "_id": "@webassemblyjs/helper-buffer@1.9.0", - "_inBundle": false, - "_integrity": "sha512-qZol43oqhq6yBPx7YM3m9Bv7WMV9Eevj6kMi6InKOuZxhw+q9hOkvq5e/PpKSiLfyetpaBnogSbNCfBwyB00CA==", - "_location": "/@webassemblyjs/helper-buffer", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@webassemblyjs/helper-buffer@1.9.0", - "name": "@webassemblyjs/helper-buffer", - "escapedName": "@webassemblyjs%2fhelper-buffer", - "scope": "@webassemblyjs", - "rawSpec": "1.9.0", - "saveSpec": null, - "fetchSpec": "1.9.0" - }, - "_requiredBy": [ - "/@webassemblyjs/helper-wasm-section", - "/@webassemblyjs/wasm-edit", - "/@webassemblyjs/wasm-opt" - ], - "_resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.9.0.tgz", - "_shasum": "a1442d269c5feb23fcbc9ef759dac3547f29de00", - "_spec": "@webassemblyjs/helper-buffer@1.9.0", - "_where": "/home/pruss/Dev/3-minute-website/node_modules/@webassemblyjs/wasm-edit", - "author": { - "name": "Sven Sauleau" - }, - "bugs": { - "url": "https://github.com/xtuc/webassemblyjs/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Buffer manipulation utility", - "devDependencies": { - "@webassemblyjs/wasm-parser": "1.9.0", - "jest-diff": "^24.0.0" - }, - "gitHead": "0440b420888c1f7701eb9762ec657775506b87d8", - "homepage": "https://github.com/xtuc/webassemblyjs#readme", - "license": "MIT", - "main": "lib/index.js", - "module": "esm/index.js", - "name": "@webassemblyjs/helper-buffer", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/xtuc/webassemblyjs.git" - }, - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "version": "1.9.0" -} |