node-switchbot 1.8.0-beta.3 → 1.8.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -49,7 +49,7 @@ class SwitchbotDeviceWoCurtain extends SwitchbotDevice {
49
49
 
50
50
  /* ------------------------------------------------------------------
51
51
  * runToPos()
52
- * - run to the targe position
52
+ * - run to the target position
53
53
  *
54
54
  * [Arguments]
55
55
  * - percent | number | Required | the percentage of target position
@@ -63,7 +63,7 @@ class SwitchbotDeviceWoCurtain extends SwitchbotDevice {
63
63
  return new Promise((resolve, reject) => {
64
64
  reject(
65
65
  new Error(
66
- "The type of target position percentage is incorrent: " +
66
+ "The type of target position percentage is incorrect: " +
67
67
  typeof percent
68
68
  )
69
69
  );
@@ -75,7 +75,7 @@ class SwitchbotDeviceWoCurtain extends SwitchbotDevice {
75
75
  if (typeof mode != "number") {
76
76
  return new Promise((resolve, reject) => {
77
77
  reject(
78
- new Error("The type of running mode is incorrent: " + typeof mode)
78
+ new Error("The type of running mode is incorrect: " + typeof mode)
79
79
  );
80
80
  });
81
81
  }
@@ -444,7 +444,7 @@ class SwitchbotDevice {
444
444
  this._connect()
445
445
  .then(() => {
446
446
  if (!this._chars) {
447
- return reject("No characteristics available.");
447
+ return reject(new Error("No characteristics available."));
448
448
  }
449
449
  return this._write(this._chars.write, req_buf);
450
450
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-switchbot",
3
- "version": "1.8.0-beta.3",
3
+ "version": "1.8.0-beta.4",
4
4
  "description": "The node-switchbot is a Node.js module which allows you to control your Switchbot Devices through Bluetooth (BLE).",
5
5
  "main": "./lib/switchbot.js",
6
6
  "files": [