Npm support

As per #19.

It seems my editor removed a bunch of trailing whitespace. If that bothers you just tell me and I'll push a new version.