Initial commit, may work
Got it to a working state

Now I gotta figure out tests and making available as an npm plugin.