# r2d2

> Plays a random sound as a notification from console or cli

Latest version **0.0.4** (published 2016-06-26) · ISC license · 0 weekly downloads

## Install

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

## 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.4 |
| Published | 2016-06-26 |
| First published | 2016-04-01 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Christian Gastrell |
| Maintainers | cg |

## Links

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

## Recent versions

- 0.0.4 (latest) — 2016-06-26
- 0.0.3 — 2016-04-01
- 0.0.2 — 2016-04-01
- 0.0.1 — 2016-04-01

## README

# r2d2
Sound notifier

## Description

Plays a random R2-D2 sound (ogg) as a notification from console or cli.

The sound is played with *gstreamer*. It **WON'T** work without it.

## Install
```bash
npm install r2d2 --save
```

## Usage

Create an instance and call `headsUp()`:
```javascript
var notifier = require('r2d2');

notifier.headsUp(function(error, stdin, stdout){
  if(err) {
    console.error('Error: couldn\'t play sound because:');
    console.error(err.stack);
  }
  console.log('You\'ve been notified');
});
```

## API
### headsUp([callback])
Plays a random sound and executes callback. Callback signature is forwarded from
[child_process.exec](https://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback): *error*, *stdin*, *stdout*


Just for fun and testing

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