aboutsummaryrefslogtreecommitdiff
path: root/node_modules/beeper/readme.md
blob: 55bdd52988e24d1019877849f503f26449953fb0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# beeper [![Build Status](https://travis-ci.org/sindresorhus/beeper.svg?branch=master)](https://travis-ci.org/sindresorhus/beeper)

> Make your terminal beep

![](https://cloud.githubusercontent.com/assets/170270/5261236/f8471100-7a49-11e4-81af-96cd09a522d9.gif)

Useful as an attention grabber e.g. when an error happens.


## Install

```
$ npm install --save beeper
```


## Usage

```js
var beeper = require('beeper');

beeper();
// beep one time

beeper(3);
// beep three times

beeper('****-*-*');
// beep, beep, beep, beep, pause, beep, pause, beep
```


## API

It will not beep if stdout is not TTY or if the user supplies the `--no-beep` flag.

### beeper([count|melody], [callback])

#### count

Type: `number`  
Default: `1`

How many times you want it to beep.

#### melody

Type: `string`

Construct your own melody by supplying a string of `*` for beep `-` for pause.


## License

MIT © [Sindre Sorhus](http://sindresorhus.com)