Bug 897683 - Uplift Add-on SDK to Firefox r=me

This commit is contained in:
Wes Kocher
2013-07-29 14:37:44 -07:00
parent ce1ba8d151
commit a5f4fadf52
67 changed files with 1812 additions and 1004 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;