# rwait

> wait for mutations in rethinkdb

Latest version **1.1.4** (published 2019-01-08) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install rwait
pnpm add rwait
yarn add rwait
bun add rwait
```

## 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.1.4 |
| Published | 2019-01-08 |
| First published | 2017-09-17 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 13.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | James Kyburz |
| Maintainers | jameskyburz |
| Keywords | rethinkdb |

## Links

- npm: https://www.npmjs.com/package/rwait
- Repository: https://github.com/JamesKyburz/rwait
- Homepage: https://github.com/JamesKyburz/rwait#readme
- Issues: https://github.com/JamesKyburz/rwait/issues
- npm.io page: https://npm.io/package/rwait

## Recent versions

- 1.1.4 (latest) — 2019-01-08
- 1.1.3 — 2019-01-08
- 1.1.2 — 2018-08-24
- 1.1.1 — 2018-08-24
- 1.1.0 — 2018-08-23
- 1.0.0 — 2017-09-17

## README

# rwait

[![js-standard-style](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://github.com/feross/standard)
[![npm](https://img.shields.io/npm/v/rwait.svg)](https://npmjs.org/package/rwait)
[![downloads](https://img.shields.io/npm/dm/rwait.svg)](https://npmjs.org/package/rwait)

## Usage

```js
const r = require('rethinkdbdash')({ host: 'localhost' })
const rwait = require('rwait')(r)

;(async () => {
  try {
    const pending = await rwait({
      db: 'test',
      table: 'test',
      timeout: 2000,
      filter: r.row('new_val')('id').eq('test')
    })

    // some operation that causes a write somewhere else....
    process.nextTick(() => {
      r.db('test').table('test').insert([ { id: 'test', value: 'hello world' } ]).run()
    })

    const value = await pending.value
    console.log('got value', value)
  } catch (err) {
    console.error('error', err)
  }
})()
```

# license

[Apache License, Version 2.0](LICENSE)

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