Bun

Globals

Bun implements the following globals.

GlobalSourceNotes
AbortControllerWeb 
AbortSignalWeb 
alertWebIntended for command-line tools
BlobWeb 
BufferNode.jsSee Node.js > Buffer
BunBunSubject to change as additional APIs are added
ByteLengthQueuingStrategyWeb 
confirmWebIntended for command-line tools
__dirnameNode.js 
__filenameNode.js 
atob()Web 
btoa()Web 
BuildMessageBun 
clearImmediate()Web 
clearInterval()Web 
clearTimeout()Web 
consoleWeb 
CountQueuingStrategyWeb 
CryptoWeb 
cryptoWeb 
CryptoKeyWeb 
CustomEventWeb 
EventWebAlso ErrorEvent CloseEvent MessageEvent.
EventTargetWeb 
exportsNode.js 
fetchWeb 
FormDataWeb 
globalNode.jsSee Node.js > global.
globalThisCross-platformAliases to global
HeadersWeb 
HTMLRewriterCloudflare 
JSONWeb 
MessageEventWeb 
moduleNode.js 
performanceWeb 
processNode.jsSee Node.js > process
promptWebIntended for command-line tools
queueMicrotask()Web 
ReadableByteStreamControllerWeb 
ReadableStreamWeb 
ReadableStreamDefaultControllerWeb 
ReadableStreamDefaultReaderWeb 
reportErrorWeb 
require()Node.js 
ResolveMessageBun 
ResponseWeb 
RequestWeb 
setImmediate()Web 
setInterval()Web 
setTimeout()Web 
ShadowRealmWebStage 3 proposal
SubtleCryptoWeb 
DOMExceptionWeb 
TextDecoderWeb 
TextEncoderWeb 
TransformStreamWeb 
TransformStreamDefaultControllerWeb 
URLWeb 
URLSearchParamsWeb 
WebAssemblyWeb 
WritableStreamWeb 
WritableStreamDefaultControllerWeb 
WritableStreamDefaultWriterWeb