Issue #132  (IIFEs, JS Utils, Productivity Tools, Uncats)01/28/16


In this week's intro I just wanted to give kudos to an article by German developer Marius Schulz called Disassembling JavaScript's IIFE Syntax. In this post, Marius breaks down exactly what an immediately invoked function expression (IIFE) is and how exactly it works.

Articles like this work well because they break down what might seem like a complex topic into simple, easy to understand pieces. Some highlights from his explanation:
  • To avoid a syntax error, the IIFE makes the JavaScript engine parse a function expression rather than a function declaration. This is accomplished by the wrapping parens.
  • ParenthesizedExpression is a thing in the spec.
  • You can place the invoking parens inside the wrapping parens, or outside. Doug Crockford prefers them inside.
  • You can name the IIFE (this was new to me, though I don't know how useful this is).
  • The opening semi-colon pattern for concat issues is beneficial for IIFEs.
  • You can create an IIFE using ES2015's arrow syntax (but Marius doesn't recommend this).
I think the only thing that Marius left out is giving credit to the developer who named the IIFE, Ben Alman. Other than that, it's a great read so check it out.


Now on to this week's tools!
 
Buy My JavaScript/DOM E-Book:

70 JavaScript and DOM Tips for $5 (EPUB, MOBI, PDF)
 

JavaScript Utilities and Mini Libraries


Custom Highlight
"A simple, open source text highlighter that allows you to add custom functions to it."

Enumify
"A JavaScript library for enums. To be used by transpiled ES6 (e.g. via Babel). The approach taken by Enumify is heavily inspired by Java enums."

Tweezer.js
"A small, dependency-free, ES6 library for smooth animations."

Extraction
"A small JavaScript library for extracting object trees from arbitrary object graphs."

RoboJS
"A library that aims to dynamically load JS modules depending on how the DOM is composed. Add a node to the DOM and a JS will be loaded. Remove a node and the JS will be disposed."

lie
"A small, performant, promise library implementing the Promises/A+ spec Version 1.1."

React Refetch
"A simple, declarative, and composable way to fetch data for React components."

Angular-trix
An AngularJS directive for Basecamp's WYSIWYG editor called Trix.

pajax
"Promise based AJAX library."

embed.js
A pure JavaScript plugin to insert or embed just about anything (MP3, CodePen, Gists, Google Map, JS Bin, Markdown, Instagram, etc).

React Progress 2
"YouTube style progress bar for ReactJS."

PureSlider
A lightweight, no-dependency slider/carousel.

 
70 JavaScript and DOM Tips for $5 (EPUB, MOBI, PDF)
 

Productivity Tools


/todo
"A to-do list for your Slack team."

rmdr
"Quickly make reminders in the terminal. Reminders are displayed in all open terminals. For Linux and OSX."

Docs Online Viewer
Chrome extension for a convenient way to open and view just about any file type.

wallabag
"A self hostable application for saving web pages. Unlike other services, wallabag is free (as in freedom) and open source."

DevTools Author
Chrome extension. "If you use DevTools as your frontend development environment, DevTools Author provides a small set of options to enhance your authoring experience."

Candy
"The flexible and visual way to organize the best things from the web."

ilos
"Ridiculously simple screen recording."

Waterfox
"A high performance browser based on the Mozilla platform. Made specifically for 64-Bit systems, Waterfox has one thing in mind: speed."

DoneDone
"From planning, to coding, to testing, to customer support, DoneDone is the refreshingly simple issue tracker. No more spreadsheets, sticky notes, and emails about web and software projects."

 
384 Pages of CSS for $7 (PDF E-Book)
 

The Uncategorizables


DocSearch
"The easiest way to add search to your documentation."

Algolia
"Hosted Search API that delivers instant and relevant results from the first keystroke."

sodacan.js
Mitigates documentation problems with software projects by auto-generating a beautiful and well laid out page from your source code and comments.

N1
"The extensible, open source mail client."

stop-server
"Shut down your computer using Node.js and a phone (works on OS X, Linux and Windows)."

Firefox for iOS
Firefox browser now available for iPhone and iPad.

HTTP Status Cats API
This is gold. Hilariously appropriate cat images for different HTTP status codes.

 
384 Pages of CSS for $7 (PDF E-Book)
 

A Tweet for Thought

Gavin Joyce has a suggestion for improving npm install speed. Does this work for everyone?
 

Suggestions / Corrections

Made something? Send links via Twitter @WebToolsWeekly (details here). No tutorials or articles, please. If you have any suggestions for improvement or corrections, feel free to reply to this email.
 

Before I Go...

You might be interested in looking at the top 30 books ranked by total number of links to Amazon in Hacker News comments.

Thanks to all for subscribing and reading!

Keep tooling,
Louis
webtoolsweekly.com
@WebToolsWeekly
Copyright © Web Tools Weekly, All rights reserved.

Email Marketing Powered by MailChimp