wasm-rquickjs-cli 0.2.4

Tool for wrapping JavaScript modules as WebAssembly components using the QuickJS engine
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import os from 'node:os';

export function test() {
    const result = {
        hasEOL: typeof os.EOL === 'string',
        eolValue: JSON.stringify(os.EOL),
        canImportAsOs: true,
        hasArch: typeof os.arch === 'function',
        hasPlatform: typeof os.platform === 'function',
        hasHostname: typeof os.hostname === 'function',
        hasUptime: typeof os.uptime === 'function',
        hasHomedir: typeof os.homedir === 'function',
        hasTmpdir: typeof os.tmpdir === 'function'
    };
    return JSON.stringify(result);
}