From c49c6a5b8dcece4c33be5e3ed0204f2fb312370c Mon Sep 17 00:00:00 2001 From: mmcwilliams Date: Sun, 17 Sep 2017 17:54:07 -0400 Subject: [PATCH] Documentation for blootstrap --- lib/blootstrap/Readme.md | 6 ++++++ lib/blootstrap/index.js | 8 ++++++++ lib/intval/Readme.md | 6 ++++++ 3 files changed, 20 insertions(+) diff --git a/lib/blootstrap/Readme.md b/lib/blootstrap/Readme.md index e69de29..017bab5 100644 --- a/lib/blootstrap/Readme.md +++ b/lib/blootstrap/Readme.md @@ -0,0 +1,6 @@ + + +## Blootstrap +Class representing the bluetooth interface + +**Kind**: global class diff --git a/lib/blootstrap/index.js b/lib/blootstrap/index.js index 33d9da0..445086b 100644 --- a/lib/blootstrap/index.js +++ b/lib/blootstrap/index.js @@ -6,6 +6,7 @@ function capitalize (s) { return s[0].toUpperCase() + s.slice(1) } +/** Class representing the bluetooth interface */ class Blootstrap { constructor () { this._onData = () => {} @@ -24,6 +25,13 @@ class Blootstrap { }) }) } + /** + * Blootstrap.on() - + * Binds functions to events that are triggered by BLE messages + * + * @param {string} eventName Name of the event to to bind + * @param {function} callback Invoked when the event is triggered + */ on (eventName, callback) { this[`_on${capitalize(eventName)}`] = callback } diff --git a/lib/intval/Readme.md b/lib/intval/Readme.md index e69de29..07e7198 100644 --- a/lib/intval/Readme.md +++ b/lib/intval/Readme.md @@ -0,0 +1,6 @@ + + +## Intval +Class representing the intval3 features + +**Kind**: global class