Skip to content

Guides

Guides and API reference for @wtf/platform: write programs that take their timers, crypto, console, file system, processes and environment as a parameter, so they run the same in Node, in a browser and in a test.

  • Getting started: learn which members a platform has, get one in Node, in a page, in memory and in a test, start a process, use the helpers, and handle errors.
  • The environment: read environment variables as a value you pass around, combine them, and parse them into typed settings.
  • Files and folders: get a folder handle wherever your code runs, read and write its files, reach a platform’s files by their paths, and read and write a file synchronously.