Hello and welcome to This Week in JavaScript, our lovingly curated collection of links relating to what’s new and exciting in the world of JS. The complete list is tagged jsweekly. (Don’t forget to check out our weekly .NET and front end roundups too!)
And now for this week’s JavaScript finds …
Getting started
- The best way to learn JavaScript - Revealed by 25 JavaScript experts.
- Sorting algorithms in JavaScript - A large range of sorting algorithms are delved in to in detail.
- Master the JavaScript interview: What is a pure function? - There may be a different way to look at functions that will make functional programming easier to understand.
Learning more
- Use a customized utility library instead of pure vanilla JS - An explaination of my view towards Vanilla JS in real world use cases.
- The current state of dependency inversion in JavaScript - Learn about the past, present and future of dependency inversion in JavaScript.
- Progressive enhancement and JavaScript failure - Can progressive enhancement help to build JavaScript web apps that handle errors gracefully?
- To bind or not to bind - I love using small functions in “then” methods, but sometimes chaining is not that simple.
- Dominant colors for lazy-Loading images - They also . This post presents a few methods to calculate the dominant color of each image to use as a placeholder, and helps you understand the GIF file format to make the most of data URIs.
- Promise-based functions should not throw exceptions - The reason is that doing so would require two kinds of error handling.
- The earthquake in the JavaScript community - Due to a conflict of interest an NPM module is unpublished. Left-pad is a dependency of many other modules. Some really popular tools like Babel and React started getting broken builds.
- Is left-pad Indicative of a fragile JavaScript ecosystem? - One developer who had published hundreds of npm modules, was upset over npm Inc’s response to a copyright infringement claim and unpublished all of his modules.
Libraries
- 10 jQuery time picker plugins - We see heaps of date pickers and calendar pickers out there but not so many time pickers, so it’s about time we showed you some!
- Match - JavaScript library to test JSON with some nice features.
- Either - A practical intro to monads in JavaScript - A tool that may increase readability and quality of code while reducing error proneness.
- MidiWriterJS - Expressive multi-track MIDI generator written in JavaScript
- ASCII art in JavaScript - This libraryautomatically convert images and movies to ASCII art.
- D3 - A vertical version of the classic D3 Sankey diagram.
- Introduction to Immutable.js and functional programming concepts - Aims to bring some of the benefits of Clojure, Scala and Haskell to JavaScript in an easy and intuitive API.
- The story behind List.js or how I launched my first open source project - When he was working for a startup his task was to make a massive list searchable, sortable and filterable. This is how List.js was born.
ES2015
- ES6 modules - Single instance pattern - Singletons exports are useful for single instance modules without reading and writing to the global space.
- How to check if Node.js supports ES 6 language feature - Two strategies that allow you to determine whether a language feature is implemented in Node.
Frameworks
- Which tech should you learn now? - Should you learn Angular 2, React, Node, or something else entirely? Let’s take a look at some data and trends and try to identify the most valuable technologies you could be learning today.
- React redux app for teaching - Online store in react, redux, webpack.
- Looping over child components in React - How to use
Array.prototype.map()
to loop over list children and render them into a list. - Codemods: Migrating a monolith - How using Codemods to migrate React code resulted in an easier migration process with less repetitive work.
- Template-driven forms in Angular 2 - We clarify a subset of form directives by focussing on template-driven forms in Angular 2.
Testing & Debugging
- Writing Testable Code in JavaScript - Some useful tips and patterns for writing testable code in JavaScript.
- Test driven RESTful API development using Node and MongoDB - Test driven development will help to make your code more stable, less error prone, loosely coupled from other module and the code will not break very easily.
- How to make unit testing complex apps easy with Sinon.js - One of the biggest stumbling blocks when writing unit tests is what to do when you have code that’s non-trivial. Here is a solution.
- Dependency injection and CommonJS in Node.js unit testing - An often used technique to manage dependencies of a module that’s great for testing, because we can control the dependencies of a module from outside.
- Introduction to Node.js’s debugger - How to debug in the terminal using Node’s debugger.
Cool stuff
- Image editor written in JS with full PSD support - A photoshop-compatible free online image editor, made with HTML5.
- Emulators written in JavaScript - A huge list of emulators that have been written.
For more links like this and to keep up-to-date with the latest goings on in JS land, you can follow SitePoint’s JavaScript channel on Twitter.
Please PM us if you have anything of interest for the next issue or if there is anything you would like to see featured. Paul and chrisofarabia.