sjl.js
function implode (list, separator) {
        var retVal = '',
            prototypeOfList = Object.getPrototypeOf(list);
        if (isArray(list)) {
            retVal = list.join(separator);
        }
        else if (prototypeOfList.constructor.name === 'Set' || prototypeOfList.constructor.name === 'SjlSet') {
            retVal = [];
            list.forEach(function (value) {
                retVal.push(value);
            });
            retVal = retVal.join(separator);
        }
        return retVal;
    }
function implode (list, separator) {
        var retVal = '',
            prototypeOfList = Object.getPrototypeOf(list);
        if (isArray(list)) {
            retVal = list.join(separator);
        }
        else if (prototypeOfList.constructor.name === 'Set' || prototypeOfList.constructor.name === 'SjlSet') {
            retVal = [];
            list.forEach(function (value) {
                retVal.push(value);
            });
            retVal = retVal.join(separator);
        }
        return retVal;
    }
function implode ( list , separator ) { var retVal = '' , prototypeOfList = Object . getPrototypeOf ( list ) ; if ( isArray ( list ) ) { retVal = list . join ( separator ) ; } else if ( prototypeOfList . constructor . name === 'Set' || prototypeOfList . constructor . name === 'SjlSet' ) { retVal = [ ] ; list . forEach ( function ( value ) { retVal . push ( value ) ; } ) ; retVal = retVal . join ( separator ) ; } return retVal ; }
Implodes a `Set`, `Array` or `SjlSet` passed in.
@function module:sjl.implode
@param list {Array|Set|SjlSet} - Members to join.
@param separator {String} - Separator to join members with.
@returns {string} - Imploded string.  *Returns empty string if no members, to join, are found.
Implodes a Set Array or SjlSet passed in .