0.1.1 • Published 8 years ago
morsejs-render-vibration v0.1.1
morsejs-render-vibration
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);
}