Open benjamincochran opened 12 years ago
YUI has a less cumbersome map feature than the example, that isn't restricted to nodes:
// Convert an array of numbers into an array of strings. Y.Array.map([1, 2, 3, 4], function (item) { return '' + item; }); // => ['1', '2', '3', '4']
So in the context of the example given, this could be a one-liner:
Y.Array.map(Y.all('a').getDOMNodes(), some_function);
Thanks! Care to turn this into a pull request?
YUI has a less cumbersome map feature than the example, that isn't restricted to nodes:
So in the context of the example given, this could be a one-liner: