Hello and welcome to ‘This Week in JavaScript’, this week, coming to you from the heart of Texas and SXSW — another curated collection of links relating to what’s new and exciting in the world of JavaScript. 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 finds …
Getting started
- Which F Is The IIFE? - To really understand what’s happening and to answer the questions, then, it’s best to break this down into individual parts and put it all back together again.
- JavaScript Debugging Tips from the Trenches - JavaScript. The combination of dynamic typing, liberal use of state mutation, closures, and asynchronousity can lead to bugs that are frightening to try and fix, but help is at hand.
- Three Ways to Reverse a String in JavaScript - Reversing a string is one of the most frequently asked JavaScript question in the technical round of interview.
Learning more
- Quick Tip: Install Multiple Versions of Node.js using nvm - Bruno Mota shows you a better way to work with multiple versions of Node.js.
- Serviceworke.rs - The Service Worker Cookbook is a collection of working, practical examples of using service workers in modern web apps.
- The Selection sort algorithm - The #sorting-algorithms series is a collection of posts about reimplemented sorting algorithms in JavaScript.
- JSONPath for parsing JSON - This is just a FYI that there is a cool little project that provides XPath like support for JSON values: JSONPath Plus.
Libraries
- An Introduction to jQuery’s Deferred Objects - Deferred objects were introduced to jQuery years before promises were introduced to ECMAScript. In this article, Aurelio De Rosa discusses what Deferred objects are, and what problems they try to solve.
- List.js v1.2.0 - Tiny, invisible and simple, yet powerful and incredibly fast vanilla JavaScript that adds search, sort, filters and flexibility to plain HTML lists, tables, or anything.
- Functional Programming in Javascript Using RxJS - This is a series of interactive exercises for learning Microsoft’s Reactive Extensions (Rx) Library for Javascript. So why is the title “Functional Programming in Javascript”? Well it turns out that the key to learning Rx is training yourself to use functional programming to manipulate collections.
- Sweet.js - In super-cool news the redesign is now self-hosting! Sweet.js is once again building sweet.js!
- All js libraries should be authored in TypeScript - André Staltz believes all JavaScript libraries which are intended to be used by thousands of developers should be written in TypeScript - in this article, he explains why.
- jQuery 1.12.2 and 2.2.2 Released - These releases include a few bug fixes, which includes two edge case bugs for jQuery.isPlainObject and a bug when setting the selected property on an option element using the .prop() method in IE 11.
ES6
- 6 Ways to Bind JavaScript’s this Keyword in React, ES6 & ES7 - Unlike a language with a rigid class model, it’s not always clear what this is going to refer to in your code, especially when dealing with callback functions, whose callsites you have no control over. Dan Prince provides six options to handling it.
- ESlint-plugin-immutable - ESLint plugin to disable all mutation in JavaScript.
- JavaScript Proposal for weak references: WeakRef - Time for another ECMAScript proposal draft - this time WeakRef. Weak references had their first – indirect – appearance in ES6, with the arrival of WeakMap and WeakSet.
Frameworks
- Developing Apps with Angular 2 MockBackend - The focus of this article is to present a way that front-end teams can become independent of the back-end and at the same time provide a useful interface which reduces the risk of structural changes.
- The need for multi-platform npm packages - Dr. Axel Rauschmayer argues that it should be possible to have multiple implementations of the same npm package (same name, same version).
- How to Build Charts in Angular - A tutorial on how to visualize data using Angular. Learn how to make beautiful charts using Angular, FusionCharts and its Angular charts plugin.
Testing
- Writing Testable Code in JavaScript: A Brief Overview - Organizing and writing code that is easily testable takes some effort and planning, but there are a few patterns, inspired by functional programming concepts, that we can use to avoid getting into a tough spot when it comes time to test our code. In this article, we will go through some useful tips and patterns for writing testable code in JavaScript.
- Code for edge cases - When testing helper functions, developers usually write the code for the perfect scenario without considering anything that could go wrong.
Other Stuff
- Awesome chrome-devtools - Tooling and resources in the Chrome DevTools ecosystem, and not just for JavaScript.
- Experimental support for WebAssembly in V8 - Experimental support for WebAssembly is available in V8 and Chromium behind a flag.
- An introduction to regular expressions - Regular expressions, or regex, is a tool for testing, analysing and matching patterns of text in a larger text set.
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 Chris of Arabia.