dist/iterable/operators.js
/** Play unique items from a set */
Play unique items from a set
Play unique items from a set
function* distinct(it) {
    const resultSet = new Set();
    for (const item of it) {
        if (!resultSet.has(item)) {
            resultSet.add(item);
            yield item;
        }
    }
}
function * distinct ( it ) { const resultSet = new Set ( ) ; for ( const item of it ) { if ( ! resultSet . has ( item ) ) { resultSet . add ( item ) ; yield item ; } } }
Play unique items from a set
Play unique items from a set