Skip to content

Commit

Permalink
docs(isIterator): add docs for isIterator() method
Browse files Browse the repository at this point in the history
  • Loading branch information
blond committed Aug 4, 2016
1 parent 69e80b2 commit 2eb0e27
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ API
---

* [isIterable(iterable)](#isiterableiterable)
* [isIterator(iterator)](#isiteratoriterator)
* [empty()](#emptyiterators)
* [series(...iterables)](#seriesiterators)
* [evenly(...iterables)](#evenlyiterators)
Expand All @@ -64,6 +65,20 @@ isIterable([1, 2, 3]); // true
isIterable(123); // false
```

### isIterator(iterator)

Returns `true` if the specified object is iterator.

```js
const isIterator = require('ho-iter').isIterator;

const generator = function *() {};
const iterator = generator();

isIterator(generator) // false
isIterator(iterator) // true
```

### empty()

Returns an empty Iterator.
Expand Down

0 comments on commit 2eb0e27

Please sign in to comment.