Julia Jacobs recently asked a question in the WatchMeCode community slack, about some asynchronous code she wanted to clean up. In this question, she wanted to know of good options for restructuring deeply nested promises without introducing any new libraries. Would it be possible to clean up the code and only use ES6 features? It’s a common […]
If you look at the latest Chrome, Safari, Firefox and MS Edge browsers, you’ll notice the compatibility and feature implementation of ES6 is darn near complete. And for the majority of developers that still have to support older browsers? Babel and other pre-compilers have you covered. There’s so much adoption among the latest browser versions, […]
It’s no secret that I’m a fan of various ES6 features. I use a lot of the new syntax options and methods on various objects whenever I can – in browser based apps as well as node.js apps. But I recently stumbled upon on a situation that had me wondering if the barrier to entry is really worth the cost, right now.
A lot of people think that Node has built-in singleton objects with the “require” function. This is far from the truth. The require function only creates a cached module instance that can easily be broken. So, what does it take to build a true singleton in Node.js?
I’ve done a lot of work with ES6 in the last 6+ months, and I’ve found that while I do still have a lot of questions about some of the new features and syntax, there are some parts that a big win for everyone, right now. To illustrate the parts that I like best, I […]
A reader recently sent me an email, asking a question about how to find an item in an array, based on a property / attribute that would match. Meaning, the object instance will be different, but the attribute (such as “id”) will be the same. This person wanted to know if there’s a good way […]
ES6 generators provide a new way of working with data that should be iterated. In fact, generators produce an iterator when you initially call the generator function. One of the things that you can do with a generator, that might not be obvious, is iterate over a never-ending series of data items while still allowing […]