Skip to content

Commit 0358e40

Browse files
v1.6.0 (#165)
## [Version 1.6.0](https://github.com/OpenWonderLabs/node-switchbot/releases/tag/v1.5.0) (2022-10-18) ## What's Changed - Added Support for Pushing Changes to Color Bulb & Strip Light - Housekeeping and update dependencies **Full Changelog**: v1.5.0...v1.6.0
1 parent 2833874 commit 0358e40

13 files changed

+1185
-615
lines changed

CHANGELOG.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,22 @@
22

33
All notable changes to this project will be documented in this file. This project uses [Semantic Versioning](https://semver.org/)
44

5-
## [Version 1.5.0](https://github.com/OpenWonderLabs/node-switchbot/releases/tag/v1.5.0) (2022-08-27)
5+
## [Version 1.6.0](https://github.com/OpenWonderLabs/node-switchbot/releases/tag/v1.5.0) (2022-10-18)
66

77
## What's Changed
88

9-
- Added Color Bulb & Strip Light Support
9+
- Added Support for Pushing Changes to Color Bulb & Strip Light
10+
- Housekeeping and update dependencies
11+
12+
**Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v1.5.0...v1.6.0
13+
14+
## [Version 1.5.0](https://github.com/OpenWonderLabs/node-switchbot/releases/tag/v1.5.0) (2022-10-07)
15+
16+
## What's Changed
17+
18+
- Added Support for receiving status updates from Color Bulb & Strip Light
1019
- Fixed issue that caused excessive logging.
20+
- Housekeeping and update dependencies
1121

1222
**Full Changelog**: https://github.com/OpenWonderLabs/node-switchbot/compare/v1.4.1...v1.5.0
1323

lib/parameter-checker.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class ParameterChecker {
3737
* an `Error` object will be set to `this._error`.
3838
*
3939
* [Usage]
40-
* let valid = parameterChecker.check(params, {
40+
* const valid = parameterChecker.check(params, {
4141
* level: {
4242
* required: false,
4343
* type: 'integer',
@@ -50,7 +50,7 @@ class ParameterChecker {
5050
* }
5151
* });
5252
* if(!valid) {
53-
* let e = parameterChecker.error.message;
53+
* const e = parameterChecker.error.message;
5454
* throw new Error(message);
5555
* }
5656
* ---------------------------------------------------------------- */
@@ -78,13 +78,13 @@ class ParameterChecker {
7878
return false;
7979
}
8080

81-
let result = true;
82-
let name_list = Object.keys(rules);
81+
const result = true;
82+
const name_list = Object.keys(rules);
8383

84-
for (let i = 0; i < name_list.length; i++) {
85-
let name = name_list[i];
86-
let v = obj[name];
87-
let rule = rules[name];
84+
for (const i = 0; i < name_list.length; i++) {
85+
const name = name_list[i];
86+
const v = obj[name];
87+
const rule = rules[name];
8888

8989
if (!rule) {
9090
rule = {};
@@ -458,7 +458,7 @@ class ParameterChecker {
458458
}
459459
}
460460
if (typeof rule.minBytes === "number") {
461-
let blen = Buffer.from(value, "utf8").length;
461+
const blen = Buffer.from(value, "utf8").length;
462462
if (blen < rule.minBytes) {
463463
this._error = {
464464
code: "LENGTH_UNDERFLOW",
@@ -475,7 +475,7 @@ class ParameterChecker {
475475
}
476476
}
477477
if (typeof rule.maxBytes === "number") {
478-
let blen = Buffer.from(value, "utf8").length;
478+
const blen = Buffer.from(value, "utf8").length;
479479
if (blen > rule.maxBytes) {
480480
this._error = {
481481
code: "LENGTH_OVERFLOW",

0 commit comments

Comments
 (0)