Convert all README code examples to pure javascript