a1-beep
v2.0.1
Published
Make the computer to play a beep sound
Downloads
15
Readme
a1-beep
Upgrading to V2: the package is a dual cjs-esm so no update should be required.
Play a beep sound on the computer.
Why
Beep is usually a \u07
character printed to console. Unfortunately, on modern computers beeping is disabled.
Usage
Pre-requisite: Make sure that the aplay
command is installed (aplay is already installed by default in Ubuntu and other distros).
Then, simply write:
const { beep } = require('a1-beep')
beep() //normal beep
Complex beeps, like songs, can also be played. Whitespace means 200ms of silence
beep('. . ... .... ..')
Notes:
beep() returns inmediately (and not async function) because there is no need for waiting beep to finish.