Bug 897683 - Uplift Addon-SDK to Firefox r=me

This commit is contained in:
Wes Kocher
2013-07-24 14:33:54 -07:00
parent f6da4ff6b7
commit 2ad7382ad0
48 changed files with 1440 additions and 683 deletions

View File

@@ -101,7 +101,7 @@ function fromIterator(iterator) {
}
exports.fromIterator = fromIterator;
function find(array, predicate) {
function find(array, predicate, fallback) {
var index = 0;
var count = array.length;
while (index < count) {
@@ -109,5 +109,6 @@ function find(array, predicate) {
if (predicate(value)) return value;
else index = index + 1;
}
return fallback;
}
exports.find = find;