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