All JavaScript native globals are available
(Object,
Array,
Promise,
etc.). There are no built-in Node.js modules like
fs,
http.
It’s possible to import npm packages as long as they don’t depend on Node.js Modules and missing
Web Globals.
Shared Globals
The following globals are available on both the server and client side.
atob() and btoa() work on binary strings, matching browser behaviour. btoa() throws an
InvalidCharacterError for characters above U+00FF, so encode text with TextEncoder first (and
decode with TextDecoder) if it may contain non-Latin-1 characters.
Client Only
The following globals are only available on the client (web) side.
Server Only
The following globals are only available on the server side.