Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Cool hack, but a cleaner solution would be to just use fs.readFileSync if you really want long strings, and let browserify/brfs to inline it for you in the browser.

Using this in a library would be pretty unsafe, given how it's browser-dependent, is prone to issues with minifcation, and could just break with future versions of your JS engine.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: