Skip to content

Commit 34a0549

Browse files
authored
Merge pull request #67 from golemcloud/default-exports
Some default exports
2 parents ae64f12 + 8039fb8 commit 34a0549

File tree

3 files changed

+37
-0
lines changed

3 files changed

+37
-0
lines changed

crates/wasm-rquickjs/skeleton/src/builtin/buffer.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2128,4 +2128,13 @@ function defineBigIntMethod (fn) {
21282128

21292129
function BufferBigIntNotDefined () {
21302130
throw new Error('BigInt not supported')
2131+
}
2132+
2133+
export default {
2134+
INSPECT_MAX_BYTES,
2135+
kMaxLength,
2136+
kStringMaxLength,
2137+
constants,
2138+
Buffer,
2139+
SlowBuffer
21312140
}

crates/wasm-rquickjs/skeleton/src/builtin/process.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@ export let env = get_env();
1111
export function cwd() {
1212
return "/";
1313
}
14+
15+
export default {argv, argv0, env, cwd};

crates/wasm-rquickjs/skeleton/src/builtin/util.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -638,3 +638,29 @@ export function callbackify(original) {
638638
getOwnPropertyDescriptors(original));
639639
return callbackified;
640640
}
641+
642+
export default {
643+
format,
644+
deprecate,
645+
debuglog,
646+
inspect,
647+
isArray,
648+
isBoolean,
649+
isNull,
650+
isNullOrUndefined,
651+
isNumber,
652+
isString,
653+
isSymbol,
654+
isUndefined,
655+
isRegExp,
656+
isObject,
657+
isDate,
658+
isError,
659+
isFunction,
660+
isPrimitive,
661+
isBuffer,
662+
log,
663+
_extend,
664+
promisify,
665+
callbackify
666+
}

0 commit comments

Comments
 (0)