0.1.1 • Published 8 years ago

morsejs-render-vibration v0.1.1

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

morsejs-render-vibration

npm version Build Status Inline docs

A plugin for morsejs to vibrate a device in timing with a morse code message using the HTML Vibration API.

Installation

Dependency

npm install --save morsejs-render-vibration

Usage

var morsejs = require("morsejs"),
    morsejsRenderVibration = require("morsejs-render-vibration"),
    translatedMessage = morsejs.translate("hello");

/* 
 * Be sure to check that vibration is supported before 
 * you start tring to vibrate the device
 */
if(morsejsRenderVibration.isVibrationSupported()){
    morsejsRenderVibration.vibrateMorse(translatedMessage);
}
0.1.1

8 years ago

0.1.0

8 years ago