mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
fixes #2333: fix prohibition of duplicate object properties
This commit is contained in:
parent
5c66e552d7
commit
c264bf04cc
5 changed files with 47 additions and 7 deletions
|
@ -74,4 +74,15 @@
|
|||
return array[array.length - (back || 0) - 1];
|
||||
};
|
||||
|
||||
exports.any = function(array, fn) {
|
||||
var e, _i, _len;
|
||||
for (_i = 0, _len = array.length; _i < _len; _i++) {
|
||||
e = array[_i];
|
||||
if (fn(e)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
}).call(this);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue