# on-ready

> Ready event helper

Latest version **0.1.0** (published 2016-09-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install on-ready
pnpm add on-ready
yarn add on-ready
bun add on-ready
```

## 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.1.0 |
| Published | 2016-09-13 |
| First published | 2015-03-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | 0.x |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Beau Sorensen |
| Maintainers | sorensen |
| Keywords | ready, events |

## Links

- npm: https://www.npmjs.com/package/on-ready
- Repository: https://github.com/sorensen/on-ready.js
- Homepage: https://github.com/sorensen/on-ready.js#readme
- Issues: https://github.com/sorensen/on-ready.js/issues
- npm.io page: https://npm.io/package/on-ready

## Alternatives

- [async-exit-hook](https://npm.io/package/async-exit-hook.md) — 3.7M weekly downloads
- [evnty](https://npm.io/package/evnty.md) — 7.2K weekly downloads
- [eleventy-plugin-asciidoc](https://npm.io/package/eleventy-plugin-asciidoc.md) — 3.5K weekly downloads
- [@jswork/next-get2get](https://npm.io/package/@jswork/next-get2get.md) — 945 weekly downloads
- [@dashersw/axon](https://npm.io/package/@dashersw/axon.md) — 934 weekly downloads

## Recent versions

- 0.1.0 (latest) — 2016-09-13
- 0.0.1 — 2015-03-06

## README

on-ready
========

Wait for a list of readyable objects to be ready. Objects used must have two 
qualifications:

1. has an `on` method
2. emits a `ready` event
3. has or can have a `ready` boolean flag to note if ready


Install
-------

With [npm](https://npmjs.org)

```
npm install on-ready
```

Usage
-----

Node.js

```js
var onReady = require('on-ready')

// use on some redis clients
var redis = require('redis')
  , client1 = redis.createClient()
  , client2 = redis.createClient()

onReady([client1, client2], function(err) {
  // ...

  client1.ready // true
  client2.ready // true
})

// can call using arguments
onReady(client1, client2, function() { 
  // ...
})

// repeated calls still work fine
onReady([client1], [client2], function() { 
  // ...
})
```

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