Closed xamgore closed 2 years ago
Sounds good. PR welcome. Shouldn't it check all the methods though, not just next
?
And asyncIterable
should be fixed too.
return
and throw
are optional, so that's fine. Would you describe this change as breaking major or minor?
I would describe it as a bug fix.
@xamgore Still interested in doing a pull request? No worries if not. Just bumping in case you forgot :)
Taking a crack at this here: https://github.com/sindresorhus/is/pull/149
Let's dive into the source code:
https://github.com/sindresorhus/is/blob/d528545e02de3396ea900cd93af478292f0697ee/source/index.ts#L184
Only
[Symbol.iterator]
property is checked, meaning the value is at leastIterable<T>
. It may beIterableIterator<T>
if the presence of one more property,next
, is ensured.Do you agree with it? Would you mind I make a PR?