hello.js

var please = require('share');
console.log('thank you');

Sunday, 12 August, 2018 UTC

Replace Repeated Characters with JavaScript

Replace Repeated Characters with JavaScript

URLs can be tricky to work with because they can be more complicated than the traditional URL format you type in. I was again reminded of this when I was parsing Webpack URLs when I saw this beauty: webpack-internal:///../rbd/pnpm-volume/144384a5-85d9-4142-b9b9-168eea22eb97/node_modules/.registry.npmjs.org/fbjs/0.8.17/node_modules/fbjs/lib/isNode.js ... more


Tuesday, 7 August, 2018 UTC

Script & Style Show: Episode 18: JavaScript Date and TC39 with Maggie Pint

Script & Style Show: Episode 18: JavaScript Date and TC39 with Maggie Pint

In this week’s episode: Todd discusses his self-imposed ban from Twitter while David tries to fathom a day without feeling the importance of people liking his pithy tweets. The episode is saved by Maggie Pint, a Microsoft open source guru who also happens ... more


Friday, 3 August, 2018 UTC

Create gists from Command Line

Create gists from Command Line

One of the best ways to gain contributors for your open source project is by providing a rough patch for the contributor to start from. One of the best ways to ask for help is by providing what you have so far and letting a mentor look it over and provide ... more


Thursday, 2 August, 2018 UTC

Get and Set Volume with JavaScript

Get and Set Volume with JavaScript

The <audio> and <video> tags provide a wealth more functionality than most people know. For instance, did you know that you could detect supported video formats and audio formats using a few JavaScript tricks? It got me to thinking about ... more


Tuesday, 31 July, 2018 UTC

Array Destructuring

Array Destructuring

Destructuring has become a major language feature in JavaScript, most prominently seen with imports, but also in function declarations and so on. While object literals are the usual case for destructuring, remember that you can also destructure Arrays ... more


Monday, 30 July, 2018 UTC

Create Custom Video Player Controls with CanJS

Create Custom Video Player Controls with CanJS

In this guide, you will learn how to create a custom video player using the <video> element and CanJS. The custom video player will: Have custom play and pause buttons. Show the current time and duration of the video. Have a <input type="range"> ... more


Tuesday, 24 July, 2018 UTC

Script & Style Show: Episode 16: JavaScript & LEDs with Kristina Durivage

Script & Style Show: Episode 16: JavaScript & LEDs with Kristina Durivage

In this episode: Todd’s back from an amazing conference and David sees this week’s guest as being the ticket to making his kids thing he’s a super hero. The amazing Kristina Durivage stops by to talk JavaScript, electrical engineering and unusual uses ... more


Thursday, 12 July, 2018 UTC

Search Git Commits Between Dates

Search Git Commits Between Dates

One of my weaknesses as a developer is relying on UIs to provide me the data I need. It’s not a fatal weakness but it does hamper me a bit. One prime example is relying on GitHub’s interface to review changes; git’s command line provides the information ... more


Wednesday, 27 June, 2018 UTC

React Node Flow

React Node Flow

Flow, the static type checker used in many React projects, feels like a gift and a curse at times; a gift in that it identifies weaknesses in your code, and a curse that sometimes you feel like you’re needlessly adjusting your code to satisfy Flow. I’ve ... more


Thursday, 21 June, 2018 UTC

Convert HTML to Markdown

Convert HTML to Markdown

One of my biggest mistakes with this blog was not finding a WordPress plugin that would allow me to write my posts with markdown; to this day I still need to write posts in “Visual” mode and then manually convert the post to HTML for “Text” mode. One ... more


Tuesday, 12 June, 2018 UTC

Uppy File Uploading

Uppy File Uploading

One of the big tasks I was charged with at my first job was setting up a system by which any customer or potential customer (aka anonymous user) could upload PDF and image files. I had loads of constraints to deal with: browser support, server settings, ... more


Tuesday, 5 June, 2018 UTC

What’s Next for Hybrid App Developers? (Sponsored)

What’s Next for Hybrid App Developers? (Sponsored)

The story of hybrid application development is a never-ending one. Each framework has to continuously strive and innovate to remain relevant, and the discussion of which framework to use is a question often asked. Most hybrid applications are built using ... more


Saturday, 2 June, 2018 UTC

Script & Style Show: Episode 11: Ionic Framework with Max Lynch

Script & Style Show: Episode 11: Ionic Framework with Max Lynch

In this episode: David blames his wife for getting sick and missing last week’s show, Todd’s got a new Jeep, and David then blames his wife for not letting him have a Jeep. Oh, and Max Lynch of Ionic Framework fame stops by to talk about Ionic, Stencil, ... more


Wednesday, 30 May, 2018 UTC

OpenRates Currency API (Sponsored)

OpenRates Currency API (Sponsored)

Creating your own APIs can be a total nightmare: worrying about uptime, load balancing, data accuracy, caching, and all of the other risks would keep me up at night. And if your API relates to money in any way? If you get that wrong you could be costing ... more


Tuesday, 22 May, 2018 UTC

Script & Style Show: Episode 10: Dojo

Script & Style Show: Episode 10: Dojo

In this episode: David and Todd welcome Dojo and JavaScript legend Dylan Schiemann and TypeScript and Dojo 2 superhero Nick Nisi. We cover the early days of Dojo, the road to 2.0, and what’s in Dojo 2.0 and beyond. Enjoy! The post Script & Style ... more


Friday, 18 May, 2018 UTC

Detect WebVR Support with JavaScript

Detect WebVR Support with JavaScript

It’s been two years since I was heavily involved with WebVR at Mozilla but, despite not contributing every day, I can see VR making leaps and bounds, from Firefox making an increased effort to Chrome pushing VR and Oculus and HTC (Vive) improving their ... more


Monday, 14 May, 2018 UTC

How to Get a React Component’s Element

How to Get a React Component’s Element

JSX is an amazing pseudo-language for React, and if I’m honest, it’s what brought me to love React so much. Using React without JSX is cumbersome and frustrating, while using JSX is such an easier way to express your code. One drawback of JSX, however, ... more


Tuesday, 8 May, 2018 UTC

Vertically Centering with Flexbox

Vertically Centering with Flexbox

Vertically centering sibling child contents is a task we’ve long needed on the web but has always seemed way more difficult than it should be. We initially used tables to accomplish the task, then moved on to CSS and JavaScript tricks because table layout ... more


Monday, 7 May, 2018 UTC

React and autofocus

React and autofocus

While I love ReactJS, I can say that I sometimes find interactions that were easy during the pre-ReactJS are annoyingly difficult or at least “indirect”. One example is properly ensuring that a given <input> element gets focused when a button in ... more


Wednesday, 18 April, 2018 UTC

Creating Spacers with Flexbox

Creating Spacers with Flexbox

I was one of the biggest fans of flexbox before it hit but, due to being shuffled around at Mozilla, I never had the chance to use it in any practice project; thus, flexbox still seems like a bit of a mystery to me. This greatly pains me because I feel ... more


Monday, 9 April, 2018 UTC

The Dark Side of Promises

The Dark Side of Promises

Since the release of es6 many new features have found their way into NodeJS, but non had quite the same impact as promises. Promises have been developed for the browser before es6 was even a thing. There were several implementations that have been used ... more


Saturday, 7 April, 2018 UTC

Script & Style Show: Episode 6: Debugging with Jason Laster

Script & Style Show: Episode 6: Debugging with Jason Laster

On this week’s episode: we welcome my colleague Jason Laster from Mozilla to speak about the Firefox DevTools debugger. We talk debugging, console shame, the future of JavaScript debuggers, and more! Have ideas for the next episode? Comment below! The ... more


Tuesday, 3 April, 2018 UTC

Destructuring and Function Arguments

Destructuring and Function Arguments

The JavaScript language has benefitted from some really awesome new features over the past few years, including arrow functions, the spread operator, and default function argument values. Even if your browser doesn’t yet support proposed JavaScript API ... more


Saturday, 31 March, 2018 UTC

Script & Style Show: Episode 5: Q&A

Script & Style Show: Episode 5: Q&A

On this week’s episode: Todd’s back from vacation while David’s knee-deep in a Firefox Debugger breakpoint UI update. We eventually move on to viewer questions that range form JavaScript knowledge, the Array.flatten controversy, front-end testing (TDD ... more


Friday, 23 March, 2018 UTC

5 Crucial Concepts for Learning d3.js and How to Understand Them

5 Crucial Concepts for Learning d3.js and How to Understand Them

You may have already heard about d3.js , the dazzling JavaScript library that lets you create beautiful charts and graphics with just a few lines of code. You might have seen some of the fantastic examples of D3 in action, or you may have heard that ... more


Tuesday, 20 March, 2018 UTC

Building a NodeJS App with MongoDB Atlas and AWS Elastic Container Service – Part 2 (Sponsored)

Building a NodeJS App with MongoDB Atlas and AWS Elastic Container Service – Part 2 (Sponsored)

It’s that time of year again! This post is part of our Road to AWS re:Invent 2017 blog series. In the weeks leading up to AWS re:Invent in Las Vegas this November, we’ll be posting about a number of topics related to running MongoDB in the public cloud. ... more


Monday, 19 March, 2018 UTC

Script & Style Show: Episode 4: Tooling

Script & Style Show: Episode 4: Tooling

On this week’s episode: David starts the show by revealing he has a headache and an hour of discussing JavaScript tooling will not make it better. The show covers the history of JavaScript tooling (from nothing to JavaScript loaders, minifiers, webpack, ... more


Thursday, 15 March, 2018 UTC

React Video Player

React Video Player

Streaming entertainment is a massive interest of mine as both a consumer and web developer. My love for streaming entertainment dates back to the early days of RealPlayer and the misery of a million codecs. Fast forward to today and I’m working a lot ... more


Tuesday, 13 March, 2018 UTC

Building a NodeJS App with MongoDB Atlas and AWS Elastic Container Service – Part 1 (Sponsored)

Building a NodeJS App with MongoDB Atlas and AWS Elastic Container Service – Part 1 (Sponsored)

It’s that time of year again! This post is part of our Road to AWS re:Invent 2017 blog series. In the weeks leading up to AWS re:Invent in Las Vegas this November, we’ll be posting about a number of topics related to running MongoDB in the public cloud. ... more


Thursday, 22 February, 2018 UTC

Script & Style Show: Episode 1: Marc Grabanski

Script & Style Show: Episode 1: Marc Grabanski

On this second episode of the Script and Style show, Todd and I welcome Marc Grabanski of Frontend Masters. After commiserating over home automation madness, we asked Marc about how he got started in the web industry, his first jobs, his entrance in ... more