# @nathanfaucett/iterator

> iterator for the browser and node.js

Latest version **0.0.2** (published 2016-08-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install @nathanfaucett/iterator
pnpm add @nathanfaucett/iterator
yarn add @nathanfaucett/iterator
bun add @nathanfaucett/iterator
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2016-08-26 |
| First published | 2016-07-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Nathan Faucett |
| Maintainers | nathanfaucett |
| Keywords | iterator, iterator.js |

## Links

- npm: https://www.npmjs.com/package/@nathanfaucett/iterator
- Repository: https://github.com/nathanfaucett/iterator
- Homepage: https://github.com/nathanfaucett/iterator#readme
- Issues: https://github.com/nathanfaucett/iterator/issues
- npm.io page: https://npm.io/package/@nathanfaucett/iterator

## Dependencies (3)

- [@nathanfaucett/apply](https://npm.io/package/@nathanfaucett/apply.md) 0.0.1
- [@nathanfaucett/is_function](https://npm.io/package/@nathanfaucett/is_function.md) ^0.0.1
- [@nathanfaucett/is_undefined](https://npm.io/package/@nathanfaucett/is_undefined.md) ^0.0.1

## Recent versions

- 0.0.2 (latest) — 2016-08-26
- 0.0.1 — 2016-07-15

## README

Iterator [![Build Status](https://travis-ci.org/nathanfaucett/iterator.svg?branch=master)](https://travis-ci.org/nathanfaucett/iterator)
=======

Iterator for the browser and node.js

```javascript
var Iterator = require("@nathanfaucett/iterator");


var array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],

    index = 0,
    length = array.length,

    iterator = new Iterator(function next() {
        if (index === length) {
            return Iterator.createDone();
        } else {
            return Iterator.createValue(Iterator.VALUES, index, array[index++]);
        }
    }),

    it = iterator.next();

while (!it.done) {
    console.log(it.value);
    it = iterator.next();
}
```

---
_Source: https://npm.io/package/@nathanfaucett/iterator · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
