JavaScript Tutorials

  • By
    Prevent Mobile Browser From Sleeping

    Web developers still have a difficult job when it comes to mobile; the web will never provide as many APIs or as much control as native mobile platforms but our users expect the same excellent experience.  Creating HTML5 games and media-heavy apps for the web can...

  • By
    Streaming Data with Fetch() and NDJSON

    *"If you stream it, you can do it" -- Walt Disney[^1] * Streams are trickling into the scene as we search for ways to improve performance. What if instead of waiting for our entire ajax response to complete, we could start showing the data as it arrives? Streams...

  • By
    Two-Factor Authentication with Node.js

    There are a variety of strategies for protecting your important online credentials.  We often hear about password managers and generators, but for me, the more important strategy is using two-factor authentication (2FA).  Passwords can be guessed, phone numbers can be spoofed, but using two-factor authentication essentially requires that user be in...

  • By
    currencylayer:  Simple, Effective Currency Conversion

    Every developer that's maintained an eCommerce site will tell you that being responsible for properly handling currency will tell you it can be a very stressful task.  If you write buggy or insecure code, you're going to cost either your employer or the user money.  An added complication for developers...

  • By
    Using Cloudinary for eCommerce

    Nothing improves sales on the web than imagery and video.  You can describe an item a dozen ways but one picture can suck the user right in, multiple photos (including a nice zoom feature) can clinch the sale.  What does this mean?  It's important to provide users...

  • By
    Functional Programming (FP) By Any Other Name…

    Don't worry, this is not YAMA (yet another monad article)! Instead, I want to talk about a library I've recently released that offers a helpful twist on typical functional programming ("FP") operations (like map(..), compose(..), etc). Before we jump in: if you're like me and have tried...

  • By
    JavaScript Deep Merge

    I recently shared how you can merge object properties with the spread operator but this method has one big limitation:  the spread operator merge isn't a "deep" merge, meaning merges are recursive.  Moreover nested object properties aren't merged -- the last value specified in the merge replaces the last, even when there are...

  • By
    Custom Neutrino Linting

    Last week my friend Eli Perelman shared Modern JavaScript Apps with Neutrino, an awesome new Node.js tool for creating amazing apps with minimal fuss.  No need to learn webpack, scour babel plugins, or search for what exactly is required to get a React.js app up and running -- just install...

  • By
    Convert String to DOM Nodes

    It wasn't too long ago that browsers were mostly stagnant when it came to implementing new APIs and features, leading to the rise of MooTools (FTW), jQuery, Dojo Toolkit, Prototype, and likewise JavaScript toolkits. Then we started doing more client side rendering and were forced...

  • By
    Unique Array Values

    When you look at any programming language, you see missing features that you find puzzling because the use case seems so common.  One such case is retrieving unique values from an array with JavaScript. Years ago I mentioned an easy way of unique value management using objects instead...