Permalink
Browse files

Removed 'map' and 'each' methods from Array extensions

There are built-in versions of these in JavaScript 1.6 which is
supported by UIAutomation.

#23
  • Loading branch information...
1 parent 43e2238 commit 539917ea3328687340450002f6a2943f8c687a6a @radiantcapsule radiantcapsule committed May 8, 2012
Showing with 0 additions and 23 deletions.
  1. +0 −23 lang-ext.js
View
@@ -25,29 +25,6 @@ function dumpProperties(obj) {
extend(Array.prototype, {
/**
- * Performs the given function +f+ on each element in the array instance.
- * The function is given the index of the current object and the object
- * itself for each element in the array.
- */
- each: function(f) {
- for (i = 0; i < this.length; i++) {
- f(i, this[i]);
- }
- },
-
- /**
- * Constructs a new array by applying the given function to each element
- * of this array.
- */
- map: function(f) {
- result = [];
- this.each(function(i,e) {
- result.push(f(i, e));
- });
- return result;
- },
-
- /**
* Applies the given function to each element in the array until a
* match is made. Otherwise returns null.
* */

0 comments on commit 539917e

Please sign in to comment.