-
-
Notifications
You must be signed in to change notification settings - Fork 243
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add wasm runtime package (#1904)
- Loading branch information
1 parent
ddeaf30
commit 120accd
Showing
24 changed files
with
4,437 additions
and
181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
diff --git a/index.js b/index.js | ||
index 7a0e9c2a123bc9d26c20bb3de4a3c4e49b24ee40..b1a53729c2900ddfca88a0f312a785c51a5aac80 100644 | ||
--- a/index.js | ||
+++ b/index.js | ||
@@ -8,19 +8,17 @@ | ||
|
||
'use strict' | ||
|
||
-const base64 = require('base64-js') | ||
-const ieee754 = require('ieee754') | ||
+import * as base64 from 'base64-js' | ||
+import * as ieee754 from 'ieee754' | ||
const customInspectSymbol = | ||
(typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation | ||
? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation | ||
: null | ||
|
||
-exports.Buffer = Buffer | ||
-exports.SlowBuffer = SlowBuffer | ||
-exports.INSPECT_MAX_BYTES = 50 | ||
+const INSPECT_MAX_BYTES = 50 | ||
|
||
const K_MAX_LENGTH = 0x7fffffff | ||
-exports.kMaxLength = K_MAX_LENGTH | ||
+const kMaxLength = K_MAX_LENGTH | ||
|
||
/** | ||
* If `Buffer.TYPED_ARRAY_SUPPORT`: | ||
@@ -616,7 +614,7 @@ Buffer.prototype.equals = function equals (b) { | ||
|
||
Buffer.prototype.inspect = function inspect () { | ||
let str = '' | ||
- const max = exports.INSPECT_MAX_BYTES | ||
+ const max = INSPECT_MAX_BYTES | ||
str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim() | ||
if (this.length > max) str += ' ... ' | ||
return '<Buffer ' + str + '>' | ||
@@ -2104,3 +2102,10 @@ function defineBigIntMethod (fn) { | ||
function BufferBigIntNotDefined () { | ||
throw new Error('BigInt not supported') | ||
} | ||
+ | ||
+export { | ||
+ Buffer, | ||
+ SlowBuffer, | ||
+ INSPECT_MAX_BYTES, | ||
+ kMaxLength, | ||
+} | ||
\ No newline at end of file |
3,839 changes: 3,839 additions & 0 deletions
3,839
.yarn/patches/node-inspect-extracted-npm-3.0.0-f661b6c334.patch
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.