whenwords WebAssembly

This playground demonstrates the whenwords library implemented in WebAssembly Text Format (WAT) - a low-level stack-based esoteric language.

The WASM module computes time calculations natively, while JavaScript handles string formatting.

Loading WebAssembly module...

timeago

Convert a timestamp to a human-readable relative time string.

Leave empty to use current time

duration

Format a number of seconds as a human-readable duration.

How it works

WAT (WebAssembly Text Format) is the human-readable text representation of WebAssembly.

The core numeric logic (calculating time differences, thresholds, and values) runs entirely in the WebAssembly module. The WASM returns codes and computed values, which JavaScript then formats into human-readable strings.

WAT features used: