js_node

    node.js-specific js bindings (fs, http, stream, ...)

    js
    node
    nodejs
    Download zip
    Author
    Version
    0.13.0
    License
    MIT
    Last updated
    2 months ago
    Downloads
    1K

    #mizchi/js_node

    Node.js global objects and variables.

    This package will move to mizchi/node in future.

    #Supported

    • cjs
    • esm

    #Node.js Module Support Status

    ModulePackageStatusNote
    node:assertmizchi/js_node/assert🧪 TestedAssertions
    node:assert/strictmizchi/js_node/assert_strict🧪 TestedStrict assertions
    node:buffermizchi/js_node/buffer🧪 TestedBuffer manipulation
    node:child_processmizchi/js_node/child_process🧪 TestedProcess spawning
    node:dnsmizchi/js_node/dns🧪 TestedDNS resolution
    node:eventsmizchi/js_node/events🧪 TestedEventEmitter
    node:fsmizchi/js_node/fs🧪 TestedFile system (callback)
    node:fs/promisesmizchi/js_node/fs_promises🧪 TestedFile system (Promise)
    node:httpmizchi/js_node/http🧪 TestedHTTP server/client
    node:http2mizchi/js_node/http2🧪 TestedHTTP/2 support
    node:httpsmizchi/js_node/https🧪 TestedHTTPS server/client
    node:inspectormizchi/js_node/inspector🧪 TestedV8 Inspector debugging
    node:modulemizchi/js_node/module🧪 TestedModule utilities
    node:netmizchi/js_node/net🧪 TestedTCP/IPC networking
    node:osmizchi/js_node/os🧪 TestedOS utilities
    node:pathmizchi/js_node/path🧪 TestedPath manipulation
    node:processmizchi/js_node/process🧪 TestedProcess information
    node:readlinemizchi/js_node/readline🧪 TestedInteractive I/O
    node:readline/promisesmizchi/js_node/readline_promises🤖 AI GeneratedInteractive I/O (Promise)
    node:sqlitemizchi/js_node/sqlite🧪 TestedSQLite database (Node 22.5+)
    node:streammizchi/js_node/stream🧪 TestedStream API
    node:stream/promisesmizchi/js_node/stream_promises🧪 TestedStream (Promise)
    node:testmizchi/js_node/test🧪 TestedTesting framework
    node:timersmizchi/js_node🧪 TestedsetTimeout/setInterval
    node:tlsmizchi/js_node/tls🧪 TestedTLS/SSL connections
    node:ttymizchi/js_node/tty🧪 TestedTerminal I/O
    node:urlmizchi/js_node/url🧪 TestedURL parsing
    node:utilmizchi/js_node/util🧪 TestedUtility functions
    node:v8mizchi/js_node/v8🧪 TestedV8 engine utilities
    node:vmmizchi/js_node/vm🧪 TestedVM script execution
    node:wasimizchi/js_node/wasi🧪 TestedWASI support
    node:worker_threadsmizchi/js_node/worker_threads🧪 TestedWorker threads
    node:zlibmizchi/js_node/zlib🧪 TestedCompression/decompression
    node:async_hooksmizchi/js_node/async_hooks🧪 TestedAsyncLocalStorage
    node:permissions-📅 PlannedPermissions API
    node:domain-❌ Not PlannedDeprecated in Node.js
    node:querystring-❌ Not PlannedUse URLSearchParams
    node:crypto-❌ Not PlannedUse Web Crypto API
    node:string_decoder-❌ Not PlannedUse TextDecoder
    node:punycode-❌ Not PlannedDeprecated
    node:dgram-❌ Not PlannedUDP sockets

    #Status Legend

    • 🧪 Tested: Comprehensive test coverage, production ready
    • 🚧 Partially: Core functionality implemented, tests incomplete
    • 🤖 AI Generated: FFI bindings created, needs testing
    • 📅 Planned: Scheduled for future implementation
    • ❌ Not Planned: Use Web standard alternatives


    Note: Node.js bindings are actively developed. Some AI-generated modules require thorough testing before production use.

    Buffer

    Process

    Immediate

    #external
    pub type Immediate

    Immediate::as_any

    clearImmediate

    fn clearImmediate(immediate : Immediate) -> Unit

    JS: clearImmediate(immediateId)

    esm_require

    fn esm_require(module_name : String) ->
    Any

    Universal require that works in both ESM and CJS environments. In CJS mode, uses native require directly. In ESM mode, requires init_esm_require() to be called first. Throws an error if used in ESM without initialization.

    import_meta_dirname

    fn import_meta_dirname() -> String

    Node.js: import.meta.dirname only esm

    import_meta_filename

    fn import_meta_filename() -> String

    Node.js: import.meta.filename only esm

    import_meta_resolve

    fn import_meta_resolve(module_name : String) -> Unit

    Node.js: import.meta.resolve(moduleName) only esm

    import_meta_url

    fn import_meta_url() -> String

    Node.js: import.meta.url only esm

    init_esm_require

    fn init_esm_require() ->
    Promise
    [Unit]

    Initialize ESM-compatible require function. Must be called once before using esm_require in pure ESM environments. Returns a Promise that resolves when initialization is complete. In CJS environments, this is a no-op (require is already available).

    module_

    fn module_() ->
    Any

    Node.js: module

    require

    fn require(module_name : String) ->
    Any

    Node.js: require(moduleName)

    require_cache

    fn require_cache() ->
    Any

    Node.js: require.cache

    require_main

    fn require_main() -> String

    Node.js: require.main only esm

    require_resolve

    fn require_resolve(module_name : String) -> Unit

    Node.js: require.resolve(moduleName) only cjs

    setImmediate

    fn setImmediate(callback : () -> Unit) -> Immediate

    JS: setImmediate(callback)