How to rewrite a JavaScript library that runs on billions of devices per day | Hacker News Reader