# ready-signal

> A ready signal. Wait for ready and signal it's ready

Latest version **1.3.0** (published 2015-07-30) · 0 weekly downloads

## Install

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

## 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.3.0 |
| Published | 2015-07-30 |
| First published | 2012-10-02 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 11 |
| Author | Raynos |
| Maintainers | raynos, jcorbin |

## Links

- npm: https://www.npmjs.com/package/ready-signal
- Repository: https://github.com/Raynos/ready-signal
- Issues: https://github.com/Raynos/ready-signal/issues
- npm.io page: https://npm.io/package/ready-signal

## Recent versions

- 1.3.0 (latest) — 2015-07-30
- 1.2.0 — 2015-04-29
- 1.1.1 — 2015-03-21
- 1.1.0 — 2015-02-26
- 1.0.0 — 2015-02-23
- 0.5.0 — 2014-06-26
- 0.4.1 — 2013-02-27
- 0.4.0 — 2012-11-20
- 0.3.0 — 2012-11-02
- 0.2.0 — 2012-10-17
- 0.1.0 — 2012-10-02

## README

# ready-signal

A ready signal. Wait for ready and signal it's ready

## Example

``` js
var Ready = require("ready-signal")
var r1 = Ready()
var r2 = Ready()
var r3 = Ready()

r1(function onReady() {
    console.log("r1 ready")
})

setTimeout(r1.signal, 1000)

r2.signal()

r2(function onReady() {
    console.log("r2 is already ready")
})

r3(function ready(ev) {
    console.log("r3 has ev", ev)
})

r3.signal("event data")
```

## Counted example

```js
var CountedReady = require("ready-signal/counted")
var counted1 = CountedReady(3)
var counted2 = CountedReady(0)
var counted3 = CountedReady(1)

counted1(function () {
   console.log("called after 3 times")
})

counted1.signal()
counted1.signal()
console.log("before 3rd")
counted1.signal()
console.log("after 3rd")

counted2.signal()

counted2(function onReady() {
    console.log("r2 is already ready")
})

counted3(function ready(ev) {
    console.log("r3 has ev", ev)
})

counted3.signal("event data")
```

## Installation

`npm install ready-signal`

## Contributors

 - Raynos
 - jcorbin
 - davewhat

## MIT Licenced

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