Porting Prototype Enumerable functions to Mootools Array objects
Written by on December 25th, 2006 in Ajax News.
Are you a Mootools user and you wish that you could use the Enumerable coolness from Prototype?
Bas Wenneker has ported the functions over, and has written up the experience.
I really like the Prototype Framework and the functionality that comes with it, but I like Mootools even more because it’s so damn small and lightweight. Sometimes the minimalistic framework is just too light. Recently I needed some of Prototypes’ Enumerable functions for an Array but the app was implemented using Mootools. So I decided to take a look at the
Array.eachfunctions provided by the two frameworks. They’re implemented in different ways but by changing the MootoolsArray.eachI was able to treat a Mootools Array like a Prototype Enumerable. In this article I’ll describe how to ‘hack’ the Enumerable functionality into Mootools. If you just want the code you should take a look at my EnumArray.js.
Source: Ajaxian
Original Article: http://ajaxian.com/archives/porting-prototype-enumerable-functions-to-mootools-array-objects