Announcing Reiterate

Following on from yesterday’s post, I went a little crazy and expanded the idea of #toFunction to Array and Hash. The end result is Reiterate, which gives you a stack of neat ways to make your JavaScript code more concise and expressive. For example:

var strings = array.map('toLowerCase.toArray');

var divs = someDivs.findAll({hasClassName: 'myClass', visible: true});

More information on the project download page.

If you’ve enjoyed this article, you might enjoy my recently published book JavaScript Testing Recipes. It’s full of simple techniques for writing modular, maintainable JavaScript apps in the browser and on the server.