Indicates whether an iterated value is a "duplicate".
Indicates whether an iterated value is a "duplicate".
Indicates whether an iterated value is a "duplicate".
Indicates whether an iterated value is a "duplicate".
Indicates whether an iterated value is a "duplicate".
Indicates whether an iterated value is a "duplicate".
Returns an iterator which removes consecutive values that resolve to the same value according to a provided function.
Symbol.iterator
and a provided iterator is iterable, the returned iterator is iterable.input iterator
function indicating whether an iterated value is a "duplicate"
iterator
var array2iterator = require( `@stdlib/array/to-iterator` );
function fcn( v ) {
return v;
}
var arr = array2iterator( [ 1, 1, 2, 3, 3 ] );
var iter = iterDedupeBy( arr, fcn );
var v = iter.next().value;
// returns 1
v = iter.next().value;
// returns 2
v = iter.next().value;
// returns 3
// ...
Returns an iterator which removes consecutive values that resolve to the same value according to a provided function.
Symbol.iterator
and a provided iterator is iterable, the returned iterator is iterable.input iterator
number of allowed consecutive duplicates
function indicating whether an iterated value is a "duplicate"
iterator
var array2iterator = require( `@stdlib/array/to-iterator` );
function fcn( v ) {
return v;
}
var arr = array2iterator( [ 1, 1, 2, 3, 3 ] );
var iter = iterDedupeBy( arr, 1, fcn );
var v = iter.next().value;
// returns 1
v = iter.next().value;
// returns 2
v = iter.next().value;
// returns 3
// ...
Indicates whether an iterated value is a "duplicate".
current source iterated value
previous source iterated value
resolved value