Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
This commit is contained in:
parent
93e3a48004
commit
b38dea0597
25901 changed files with 9982925 additions and 369 deletions
23
gaia/apps/email/js/array.js
Executable file
23
gaia/apps/email/js/array.js
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
'use strict';
|
||||
define(function(require) {
|
||||
var array = {
|
||||
/**
|
||||
* @param {Array} array some array.
|
||||
* @param {Function} callback function to test for each element.
|
||||
* @param {Object} thisObject object to use as this for callback.
|
||||
*/
|
||||
indexOfGeneric: function(array, callback, thisObject) {
|
||||
var result = -1;
|
||||
array.some(function(value, index) {
|
||||
if (callback.call(thisObject, value)) {
|
||||
result = index;
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
return result;
|
||||
}
|
||||
};
|
||||
|
||||
return array;
|
||||
});
|
||||
Loading…
Reference in a new issue