Code coverage report for array/join.js

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

All files » array/ » join.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 181   1 46             1 14 14     1    
define(['./filter'], function(filter) {
 
    function isValidString(val) {
        return (val != null && val !== '');
    }
 
    /**
     * Joins strings with the specified separator inserted between each value.
     * Null values and empty strings will be excluded.
     */
    function join(items, separator) {
        separator = separator || '';
        return filter(items, isValidString).join(separator);
    }
 
    return join;
});