Home | History | Annotate | Download | only in mocha

Lines Matching refs:arr

1209  *       var arr = [1,2,3];
1210 * ok(arr.length == 3);
1214 * var arr = [1,2,3];
1215 * ok(arr.indexOf(1) == 0);
1216 * ok(arr.indexOf(2) == 1);
1217 * ok(arr.indexOf(3) == 2);
4465 Runnable.prototype.globals = function(arr){
4467 this._allowedGlobals = arr;
4722 * Allow the given `arr` of globals.
4724 * @param {Array} arr
4729 Runner.prototype.globals = function(arr){
4731 debug('globals %j', arr);
4732 this._globals = this._globals.concat(arr);
5739 exports.forEach = function(arr, fn, scope){
5740 for (var i = 0, l = arr.length; i < l; i++)
5741 fn.call(scope, arr[i], i);
5753 exports.map = function(arr, fn, scope){
5755 for (var i = 0, l = arr.length; i < l; i++)
5756 result.push(fn.call(scope, arr[i], i, arr));
5763 * @parma {Array} arr
5769 exports.indexOf = function(arr, obj, start){
5770 for (var i = start || 0, l = arr.length; i < l; i++) {
5771 if (arr[i] === obj)
5786 exports.reduce = function(arr, fn, val){
5789 for (var i = 0, l = arr.length; i < l; i++) {
5790 rval = fn(rval, arr[i], i, arr);
5804 exports.filter = function(arr, fn){
5807 for (var i = 0, l = arr.length; i < l; i++) {
5808 var val = arr[i];
5809 if (fn(val, i, arr)) ret.push(val);