Now works as a library in vanilla es5.