beeper
Make your terminal beep
Last updated 9 years ago by sindresorhus .
MIT · Repository · Bugs · Original npm
$ cnpm install beeper 
SYNC missed versions from official npm registry.

beeper Build Status

Make your terminal beep

Useful as an attention grabber. For example, when an error happens.

Install

$ npm install beeper

Usage

const beeper = require('beeper');

(async => {
	await beeper();
	// beep one time

	await beeper(3);
	// beep three times

	await 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])

Returns a Promise<void> that is resolved after the melody has ended.

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

Current Tags

  • 1.1.1                                ...           latest (9 years ago)

1 Versions

  • 1.1.1                                ...           9 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (2)
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org