Code coverage report for array/reject.js

Statements: 100% (9 / 9)      Branches: 100% (2 / 2)      Functions: 100% (4 / 4)      Lines: 100% (8 / 8)     

All files » array/ » reject.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 181         1 3 3 16 3     3     1    
define(['./forEach'], function(forEach) {
 
    /**
     * Array reject
     */
    function reject(arr, callback, thisObj) {
        var results = [];
        forEach(arr, function(val, i, arr) {
            if (!callback.call(thisObj, val, i, arr)) {
                results.push(val);
            }
        });
        return results;
    }
 
    return reject;
});