lib/escort.js
function (array) {
        var set = {};

        var result = [];
        for (var i = 0, len = array.length; i < len; i += 1) {
            var item = array[i];

            if (!Object.prototype.hasOwnProperty.call(set, item)) {
                set[item] = true;
                result.push(item);
            }
        }
        return result;
    }
function (array) {
        var set = {};

        var result = [];
        for (var i = 0, len = array.length; i < len; i += 1) {
            var item = array[i];

            if (!Object.prototype.hasOwnProperty.call(set, item)) {
                set[item] = true;
                result.push(item);
            }
        }
        return result;
    }
function ( array ) { var set = { } ; var result = [ ] ; for ( var i = 0 , len = array . length ; i < len ; i += 1 ) { var item = array [ i ] ; if ( ! Object . prototype . hasOwnProperty . call ( set , item ) ) { set [ item ] = true ; result . push ( item ) ; } } return result ; }
Return an array with only distinct elements.
This assumes that the elements of an array have their uniqueness determined by their String value.

@param {Array} array The array to iterate over.
@return {Array} An array with distinct elements.
@api private

@example distinct(["a", "b", "c", "a", "a", "c"]) => ["a", "b", "c"]
Return an array with only distinct elements . This assumes that the elements of an array have their uniqueness determined by their String value .