0.1.1 • Published 4 years ago

beepz v0.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

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