Initial commit: The code works and it's documented

There are no tests at the moment, but the inline documentation (via
JSDoc) is fairly comprehensive. It can be compiled using JSDoc from npm,
per the package.json file. The README should adequately describe how to
start using the file for the basic case.