From eaea510a354dab1c4c55fdde3d58c49f62c17216 Mon Sep 17 00:00:00 2001 From: Nathan Kunicki Date: Wed, 20 Jun 2018 14:32:01 +0100 Subject: [PATCH] Better consts --- README.md | 94 ++++++++++++++++++++++++++-------------------------- package.json | 2 +- 2 files changed, 48 insertions(+), 48 deletions(-) diff --git a/README.md b/README.md index 150f5d2..2407ac7 100644 --- a/README.md +++ b/README.md @@ -3,12 +3,12 @@
LPF2EventEmitter
-
HubEventEmitter
-
BoostHubHub
WeDo2HubHub
+
HubEventEmitter
+
@@ -38,51 +38,6 @@ Emits when a LPF2 Hub device is found. | --- | --- | | hub | [Hub](#Hub) | - - -## Hub ⇐ EventEmitter -**Kind**: global class -**Extends**: EventEmitter - -* [Hub](#Hub) ⇐ EventEmitter - * [.connect([callback])](#Hub+connect) - * [.subscribe(port, [mode])](#Hub+subscribe) - * [.unsubscribe(port)](#Hub+unsubscribe) - - - -### hub.connect([callback]) -Connect to the Hub. - -**Kind**: instance method of [Hub](#Hub) - -| Param | Type | -| --- | --- | -| [callback] | function | - - - -### hub.subscribe(port, [mode]) -Subscribe to sensor notifications on a given port. - -**Kind**: instance method of [Hub](#Hub) - -| Param | Type | Default | Description | -| --- | --- | --- | --- | -| port | string | | | -| [mode] | number \| boolean | false | The sensor mode to activate. If no mode is provided, the default for that sensor will be chosen. | - - - -### hub.unsubscribe(port) -Unsubscribe to sensor notifications on a given port. - -**Kind**: instance method of [Hub](#Hub) - -| Param | Type | -| --- | --- | -| port | string | - ## BoostHub ⇐ [Hub](#Hub) @@ -384,3 +339,48 @@ Emits when a rotation sensor is activated. | port | string | | rotation | number | + + +## Hub ⇐ EventEmitter +**Kind**: global class +**Extends**: EventEmitter + +* [Hub](#Hub) ⇐ EventEmitter + * [.connect([callback])](#Hub+connect) + * [.subscribe(port, [mode])](#Hub+subscribe) + * [.unsubscribe(port)](#Hub+unsubscribe) + + + +### hub.connect([callback]) +Connect to the Hub. + +**Kind**: instance method of [Hub](#Hub) + +| Param | Type | +| --- | --- | +| [callback] | function | + + + +### hub.subscribe(port, [mode]) +Subscribe to sensor notifications on a given port. + +**Kind**: instance method of [Hub](#Hub) + +| Param | Type | Default | Description | +| --- | --- | --- | --- | +| port | string | | | +| [mode] | number \| boolean | false | The sensor mode to activate. If no mode is provided, the default for that sensor will be chosen. | + + + +### hub.unsubscribe(port) +Unsubscribe to sensor notifications on a given port. + +**Kind**: instance method of [Hub](#Hub) + +| Param | Type | +| --- | --- | +| port | string | + diff --git a/package.json b/package.json index 2072bc0..56caee5 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "types": "dist/lpf2.d.ts", "scripts": { "build": "tslint -c tslint.json \"*.ts\" && tsc", - "docs": "jsdoc2md dist/lpf2.js dist/hub.js dist/boosthub.js dist/wedo2hub.js > README.md" + "docs": "jsdoc2md dist/lpf2.js dist/boosthub.js dist/wedo2hub.js dist/hub.js > README.md" }, "author": "Nathan Kunicki ", "license": "MIT",