Skip to content

Node compatibility

This library tries to provide basic support for most common used Node.js modules and use cases. The focus is not to provide a 100% Node.js compatibility environment.

ModuleSupportedDescription
assertProvides a set of assertion functions for testing
async_hooksProvides an API to track asynchronous resources
bufferProvides a way of handling binary data
child_processAllows for the creation of child processes
clusterProvides support for creating a cluster of Node.js processes
consoleSimple debugging console similar to the JavaScript console
cryptoProvides cryptographic functionality
dgramProvides implementation of UDP datagram sockets
dnsProvides DNS lookups and name resolution functions
domainSimplified handling of uncaught exceptions
eventsProvides an event-driven programming model
fsProvides an API for interacting with the file system
httpProvides HTTP server and client functionality
http2Provides HTTP/2 server and client functionality
httpsProvides HTTPS server and client functionality
inspectorProvides an interface for debugging Node.js applications
moduleLoad and manage Node.js modules
netProvides an asynchronous network API
osProvides operating system-related utility methods
pathProvides utilities for working with file and directory paths
perf_hooksPerformance timing APIs
processProvides information and control over the current process
punycodeProvides encoding and decoding of Punycode
querystringProvides utilities for parsing and formatting URL query strings
readlineProvides an interface for reading data from a Readable stream
replProvides a Read-Eval-Print Loop (REPL) interface
streamProvides an API for implementing stream-based I/O
string_decoderProvides utilities for decoding buffer objects into strings
timersProvides timer functions similar to those in JavaScript
tlsProvides an implementation of TLS and SSL protocols
trace_eventsProvides a mechanism to centralize tracing information
ttyProvides utilities for working with TTYs (terminals)
urlProvides utilities for URL resolution and parsing
utilProvides various utility functions
v8Provides an API for interacting with the V8 JavaScript engine
vmProvides APIs for compiling and running code within V8 VM contexts
worker_threadsProvides a mechanism to use threads for JavaScript execution
zlibProvides compression and decompression functionalities

node:fs

Thanks to memfs, this lib provides basic support of node:fs and node:fs/promises module.

MethodSupported
access
accessSync
appendFile
appendFileSync
chmod
chmodSync
chown
chownSync
close
closeSync
copyFile
copyFileSync
createReadStream
createWriteStream
exists
existsSync
fchmod
fchmodSync
fchown
fchownSync
fdatasync
fdatasyncSync
fstat
fstatSync
fsync
fsyncSync
ftruncate
ftruncateSync
futimes
futimesSync
lchmod
lchmodSync
lchown
lchownSync
link
linkSync
lstat
lstatSync
mkdir
mkdirSync
mkdtemp
mkdtempSync
open
openSync
readdir
readdirSync
read
readSync
readFile
readFileSync
readlink
readlinkSync
realpath
realpathSync
rename
renameSync
rmdir
rmdirSync
stat
statSync
symlink
symlinkSync
truncate
truncateSync
unlink
unlinkSync
utimes
utimesSync
write
writeSync
writeFile
writeFileSync

node:assert

MethodSupported
fail
ok
equal
notEqual
deepEqual
notDeepEqual
strictEqual
notStrictEqual

node:module

MethodSupported
createRequire
isBuiltin
register
syncBuiltinESMExports

node:path

MethodSupported
parse
format
extname
basename
dirname
_makeLong
relative
join
isAbsolute
normalize
resolve
_format
normalizeStringPosix
assertPath

node:util

MethodSupported
promisify
callbackify
inherits
deprecate

Here are the supported util.types methods:

MethodSupported
isAnyArrayBuffer
isArrayBufferView
isArgumentsObject
isArrayBuffer
isAsyncFunction
isBigInt64Array
isBigUint64Array
isBooleanObject
isBoxedPrimitive
isDataView
isDate
isFloat32Array
isFloat64Array
isGeneratorFunction
isGeneratorObject
isInt8Array
isInt16Array
isInt32Array
isMap
isMapIterator
isNativeError
isNumberObject
isPromise
isRegExp
isSet
isSetIterator
isSharedArrayBuffer
isStringObject
isSymbolObject
isTypedArray
isUint8Array
isUint8ClampedArray
isUint16Array
isUint32Array
isWeakMap
isWeakSet

node:events

A copy of eventemitter3 is used.