build: use .txt() for the "date" value

The ISO date string should never have any invalid chars
in it anyways, but just to be safe...
build: slight cleanup and optimizations
build: more lint
build: add support for Typed Arrays and ArrayBuffers

This makes it possible to encode `<data>` elements
from within the browser (since the Buffer constructor
isn't available there)