Skip to content

Commit 503d531

Browse files
committed
Refactor to ignore iterator return values
1 parent 208a9cc commit 503d531

File tree

2 files changed

+0
-394
lines changed
  • lib/node_modules/@stdlib/iter/intersection-by-hash

2 files changed

+0
-394
lines changed

lib/node_modules/@stdlib/iter/intersection-by-hash/lib/main.js

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
var setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );
2424
var isFunction = require( '@stdlib/assert/is-function' );
2525
var isIteratorLike = require( '@stdlib/assert/is-iterator-like' );
26-
var hasOwnProp = require( '@stdlib/assert/has-own-property' );
2726
var iteratorSymbol = require( '@stdlib/symbol/iterator' );
2827
var LinkedList = require( '@stdlib/utils/linked-list' );
2928

@@ -94,16 +93,6 @@ function intersection( iterators, hashFcn, thisArg ) {
9493
while ( true ) {
9594
v = it.next();
9695
if ( v.done ) {
97-
if ( hasOwnProp( v, 'value' ) ) {
98-
hv = hashFcn.call( thisArg, v.value );
99-
100-
// Determine if we have seen this hash before...
101-
n = getNode( hash, hv );
102-
if ( n === null ) {
103-
// First time we have seen this hash, so add to our set of hashes:
104-
hash.push( [ hv, v.value, 1 ] );
105-
}
106-
}
10796
break;
10897
}
10998
hv = hashFcn.call( thisArg, v.value );
@@ -125,14 +114,6 @@ function intersection( iterators, hashFcn, thisArg ) {
125114
while ( true ) {
126115
v = it.next();
127116
if ( v.done ) {
128-
if ( hasOwnProp( v, 'value' ) ) {
129-
hv = hashFcn.call( thisArg, v.value );
130-
n = getNode( hash, hv );
131-
if ( n && n.value[ 2 ] === j ) {
132-
// Only increment a hash's counter the first time we see the hash per iterator...
133-
n.value[ 2 ] += 1;
134-
}
135-
}
136117
break;
137118
}
138119
hv = hashFcn.call( thisArg, v.value );

0 commit comments

Comments
 (0)