diff options
| author | EuAndreh <eu@euandre.org> | 2025-07-20 09:51:11 -0300 |
|---|---|---|
| committer | EuAndreh <eu@euandre.org> | 2025-07-20 09:51:11 -0300 |
| commit | 4a2d42910aa499e397a72a528d54f7f19f2fc8e7 (patch) | |
| tree | 315bb0e4353b2bf0beec4cb0391de8d5ca887ce2 | |
| parent | Makefile: Update installation directory to be compatible with node (diff) | |
| download | sjs-4a2d42910aa499e397a72a528d54f7f19f2fc8e7.tar.gz sjs-4a2d42910aa499e397a72a528d54f7f19f2fc8e7.tar.xz | |
src/sjs.mjs (mappings): Add `tap()`
| -rw-r--r-- | src/sjs.mjs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/sjs.mjs b/src/sjs.mjs index e9da7fc..aae85a7 100644 --- a/src/sjs.mjs +++ b/src/sjs.mjs @@ -461,11 +461,27 @@ const mappings = { }; }, }, + tap: { + qjs: () => null, + node: async () => { + const util = await import("node:util"); + return x => { + console.log(util.inspect(x, { + depth: null, + colors: true, + })); + return x; + }; + }, + deno: () => null, + browser: () => null, + }, }; export const JSImpl = getJSImpl(); export const exit = await mappings.exit[ JSImpl]?.(); export const ARGV = await mappings.ARGV[ JSImpl]?.(); +export const tap = await mappings.tap[ JSImpl]?.(); const tconf = await mappings.tconf[JSImpl]?.(); export const runTests = async tests => { |
