Code coverage report for string/makePath.js

Statements: 100% (6 / 6)      Branches: 100% (0 / 0)      Functions: 100% (3 / 3)      Lines: 100% (5 / 5)     

All files » string/ » makePath.js
1 2 3 4 5 6 7 8 9 10 11 12 13 141           1 10 10     1    
define(['../array/join'], function(join){
 
    /**
     * Group arguments as path segments, if any of the args is `null` or an
     * empty string it will be ignored from resulting path.
     */
    function makePath(var_args){
        var result = join(Array.prototype.slice.call(arguments), '/');
        return result.replace(/\/{2,}/g, '/');
    }
 
    return makePath;
});