1 define(['../array/join', '../array/slice'], function(join, slice){
4 * Group arguments as path segments, if any of the args is `null` or an
5 * empty string it will be ignored from resulting path.
7 function makePath(var_args){
8 var result = join(slice(arguments), '/');
9 // need to disconsider duplicate '/' after protocol (eg: 'http://')
10 return result.replace(/([^:\/]|^)\/{2,}/g, '$1/');