@f/is-iterator
v1.0.1
Published
Check if iterator.
Downloads
48
Readme
is-iterator
Check if iterator.
Installation
$ npm install @f/is-iterator
Usage
var isIterator = require('@f/is-iterator')
isIterator((function * () {})()) // => true
API
isIterator(obj, strict)
obj
- object to check for iterator interfacestrict
- when strict is truethrow
is required in addition tonext
Returns: boolean indicating if iterator
License
MIT