Monday, December 25th, 2006
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 Mootools
Array.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.
Posted by Dion Almaer at 8:20 am