Skip to main content Accessibility Feedback

JavaScript Anywhere

Over the last few weeks, I’ve converted all of my open source scripts to a UMD pattern.

UMD, or Universal Module Definition, is a simple wrapper around your code that allows it to run both in a browser and on a server (and theoretically, other places, too). While not formally registered, I also added instructions on installing the scripts with NPM, Bower, and Component using the GitHub hook if any of those are your thing.

The boilerplate I use to start all of my scripts is available on GitHub if you want to give UMD a go yourself. Major kudos to Todd Motto for helping me get started.

🚀 Make 2018 the year you master JavaScript! My pocket guides and mini courses are short, focused, and made for beginners. You can do this!

Have any questions or comments about this post? Email me at or contact me on Twitter at @ChrisFerdinandi.

Get Daily Developer Tips