function clipDuplicates(str) {
    return str.replace(/([\s\S])(?=[\s\S]*\1)/g, '');
}
Removes any duplicate characters from the provided string.

@private
@param {String} str String to remove duplicate characters from.
@returns {string} String with any duplicate characters removed.