1 2 3 4 5 6 7 8 9 10 11 12 13 14 | 1 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; }); |