4 ms·
+1. I'm a big fan of top level function binds to remove boilerplate and keep code readable: const log = console.log.bind(console), query = document.quer
by nailer 9y ago
+1. I'm a big fan of top level function binds to remove boilerplate and keep code readable:
const log = console.log.bind(console),
query = document.querySelector.bind(document),
queryAll = document.querySelectorAll.bind(document);
- RReverser 9y agoYou don't need to bind `console.log` by the way (at least not in any recent version of Node.js or browsers).