qcloud-iotexplorer-common-libs
Advanced tools
Comparing version 3.0.111 to 3.0.112
@@ -34,3 +34,6 @@ "use strict"; | ||
const stringToTlv = (value) => { | ||
const converted = `${(0, utils_1.U16ToHexString)(value.length)}${utils_1.byteUtil.byteArrayToHex(utils_1.byteUtil.stringToByteArray(value))}`; | ||
// 先转成buffer | ||
const byteArr = utils_1.byteUtil.stringToUtf8ByteArray(value); | ||
// 长度(2字节) + 具体数据buffer | ||
const converted = `${(0, utils_1.U16ToHexString)(byteArr.length)}${utils_1.byteUtil.byteArrayToHex(byteArr)}`; | ||
return utils_1.byteUtil.hexString2hexArray(converted) || ['']; | ||
@@ -37,0 +40,0 @@ }; |
@@ -25,3 +25,6 @@ /* eslint-disable @typescript-eslint/naming-convention */ | ||
export const stringToTlv = (value) => { | ||
const converted = `${U16ToHexString(value.length)}${byteUtil.byteArrayToHex(byteUtil.stringToByteArray(value))}`; | ||
// 先转成buffer | ||
const byteArr = byteUtil.stringToUtf8ByteArray(value); | ||
// 长度(2字节) + 具体数据buffer | ||
const converted = `${U16ToHexString(byteArr.length)}${byteUtil.byteArrayToHex(byteArr)}`; | ||
return byteUtil.hexString2hexArray(converted) || ['']; | ||
@@ -28,0 +31,0 @@ }; |
{ | ||
"name": "qcloud-iotexplorer-common-libs", | ||
"version": "3.0.111", | ||
"version": "3.0.112", | ||
"description": "腾讯云IOT前端通用工具库", | ||
@@ -21,3 +21,3 @@ "bugs": { | ||
"dependencies": { | ||
"qcloud-iotexplorer-logger": "3.0.111", | ||
"qcloud-iotexplorer-logger": "3.0.112", | ||
"rxjs": "^7.8.0", | ||
@@ -31,3 +31,3 @@ "shortid-for-miniprogram": "^2.2.15", | ||
}, | ||
"gitHead": "32bdc2412db2251ca9f37f76d3aed5bb523a9395" | ||
"gitHead": "3dcd7ae5c0d5d89614a991c96ea4688dd262531b" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1007662
14850
+ Addedqcloud-iotexplorer-logger@3.0.112(transitive)
- Removedqcloud-iotexplorer-logger@3.0.111(transitive)