npm.io
0.1.1 • Published 6 years ago

beepz

Licence
MIT
Version
0.1.1
Deps
0
Size
4 kB
Vulns
0
Weekly
0

Background

This project is a javascript debugging tool to play beeps as an alternative to Console logging.

Install

$ npm install beepz

Import

import Beep from 'beepz'
or
import { Beep } from 'beepz';
for simple import

import { Beep, OPTIONS } from 'beepz';
to import with OPTIONS flags.

Usage

Beep();

OPTIONS are flags which alter the beep:

LowVolume / MediumVolume / HighVolume
LowPitch / MediumPitch / HighPitch
LowDuration / MediumDuration / HighDuration
SquareWave / SineWave / TriangleWave
Wait

e.g.
Beep(OPTIONS.LowVolume | OPTIONS.LowPitch | OPTIONS.MediumDuration | OPTION.SineWave);

or
Beep(OPTIONS.MediumVolume | OPTIONS.LowDuration);

To wait for the beep to complete (e.g. to play a second beep afterwards, rather than at the same time) use async/await:

(async () => {
       await Beep(OPTIONS.LongDuration | OPTIONS.Wait);
       await Beep(OPTIONS.LongDuration | OPTIONS.Wait | OPTIONS.HighPitch);
})()

Licence

MIT Merchistoun