tmc.js 0.3.13 → 0.3.14
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.
- package/README.md +4 -0
- package/lib/message.js +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -228,6 +228,10 @@ new Tmc('your_app_key', 'your_app_secret', { autoReplyConfirmation: false })
|
|
|
228
228
|
|
|
229
229
|
- [淘宝开放平台-消息服务使用介绍](https://open.taobao.com/doc.htm?docId=101663&docType=1)
|
|
230
230
|
|
|
231
|
+
## 变更历史
|
|
232
|
+
|
|
233
|
+
It used [the github release page for the Changelog](releases) here.
|
|
234
|
+
|
|
231
235
|
## License
|
|
232
236
|
|
|
233
237
|
[MIT](LICENSE)
|
package/lib/message.js
CHANGED
|
@@ -131,13 +131,13 @@ class Encoder {
|
|
|
131
131
|
|
|
132
132
|
if (type === 'number') {
|
|
133
133
|
switch (true) {
|
|
134
|
-
case value >= -128 && value <
|
|
134
|
+
case value >= -128 && value < 128: //[-(2**7), 2**7)
|
|
135
135
|
return this.put(Byte).put(value);
|
|
136
136
|
|
|
137
|
-
case value >= -32_768 && value <
|
|
137
|
+
case value >= -32_768 && value < 32_768: //[-(2**15), 2**15)
|
|
138
138
|
return this.put(Int16).putShort(value);
|
|
139
139
|
|
|
140
|
-
case value >= -2_147_483_648 && value <
|
|
140
|
+
case value >= -2_147_483_648 && value < 2_147_483_648: //[-(2**31), 2**31)
|
|
141
141
|
return this.put(Int32).putInt(value);
|
|
142
142
|
|
|
143
143
|
default:
|