Build in the browser
The builder reads a single file, partitions it in a worker, and returns the tree contract the rest of the stack already knows how to render.
import { loadSingleFileSource, openSingleFileTree } from '@voxelkloud/format-single'
const source = await loadSingleFileSource(file)
const tree = await openSingleFileTree(source)