# node-while-loop

> A while loop alternative for Nodejs based on promises.

Latest version **1.0.4** (published 2015-12-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install node-while-loop
pnpm add node-while-loop
yarn add node-while-loop
bun add node-while-loop
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2015-12-24 |
| First published | 2015-12-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Mandeep Singh |
| Maintainers | daxlab |
| Keywords | while, loop, iterate |

## Links

- npm: https://www.npmjs.com/package/node-while-loop
- Repository: https://github.com/daxlab/node-while-loop
- Homepage: https://github.com/daxlab/node-while-loop#readme
- Issues: https://github.com/daxlab/node-while-loop/issues
- npm.io page: https://npm.io/package/node-while-loop

## Dependencies (1)

- [bluebird](https://npm.io/package/bluebird.md) ^3.1.1

## Recent versions

- 1.0.4 (latest) — 2015-12-24
- 1.0.2 — 2015-12-23
- 1.0.1 — 2015-12-22

## README

# node-while-loop [![Build Status](https://travis-ci.org/daxlab/node-while-loop.svg?branch=master)](https://travis-ci.org/daxlab/node-while-loop)
A while loop alternative for Nodejs based on promises.

## Install

```
$ npm install --save node-while-loop
```

## Usage

```js
var loop = require('node-while-loop');

var i = 1;
loop.while(function () {
    return i * i < 10;
}, function () {
    console.log(i);
    i++;
});
console.log('Hello Node!');

/* Output
Hello Node!
1
2
3
*/
```

## API

### while(condition, action)

condition function refers to a bool returning function which when returns false, breaks the loop.

action function refers to the task which needs to be iteratively performed.

## License

MIT © [Mandeep Singh](http://github.com/daxlab)

## TODO

Tests

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