duml-packet
Advanced tools
Comparing version 2.0.3 to 2.0.4
@@ -290,7 +290,17 @@ // Based off | ||
* | ||
* @param {PacketOptions} packet | ||
* @param {PacketOptions} packetOptions | ||
* @param {boolean} [autoCalculate=true] if the underlying packet should be auto generated based on the data (fix any broken crcs, lengths, etc) | ||
* @returns {Packet} | ||
*/ | ||
constructor(packet, autoCalculate = true) { | ||
constructor(packetOptions, autoCalculate = true) { | ||
let packet; | ||
// Catch mistakes where a buffer is directly passed in | ||
if (packetOptions instanceof Buffer) { | ||
packet = { | ||
raw: packetOptions, | ||
}; | ||
} | ||
else { | ||
packet = packetOptions; | ||
} | ||
// If any raw types have been passed, then they will take presidence | ||
@@ -297,0 +307,0 @@ // over other parameters passed in |
@@ -50,7 +50,7 @@ import { EventEmitter } from 'node:events'; | ||
* | ||
* @param {PacketOptions} packet | ||
* @param {PacketOptions} packetOptions | ||
* @param {boolean} [autoCalculate=true] if the underlying packet should be auto generated based on the data (fix any broken crcs, lengths, etc) | ||
* @returns {Packet} | ||
*/ | ||
constructor(packet: PacketOptions, autoCalculate?: boolean); | ||
constructor(packetOptions: PacketOptions, autoCalculate?: boolean); | ||
private createPacketProxy; | ||
@@ -57,0 +57,0 @@ /** |
ISC License | ||
Copyright 2022 Tim 'diff' Strazzere <diff@protonmail.com> | ||
Copyright 2022-2024 Tim 'diff' Strazzere <diff@protonmail.com> | ||
@@ -5,0 +5,0 @@ Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. |
{ | ||
"name": "duml-packet", | ||
"version": "2.0.3", | ||
"version": "2.0.4", | ||
"description": "For use when parsing and modifying DUML packets for DJI drones", | ||
@@ -49,5 +49,5 @@ "exports": { | ||
"@biomejs/biome": "^1.8.3", | ||
"@rollup/plugin-typescript": "^11.1.6", | ||
"@types/chai": "^4.3.4", | ||
"@types/mocha": "^10.0.1", | ||
"@rollup/plugin-typescript": "^12.1.0", | ||
"@types/chai": "^5.0.0", | ||
"@types/mocha": "^10.0.9", | ||
"@types/yargs": "^17.0.24", | ||
@@ -61,3 +61,4 @@ "c8": "^10.1.2", | ||
"ts-node": "^10.9.1", | ||
"typescript": "^5.4.2" | ||
"tslib": "^2.7.0", | ||
"typescript": "^5.6.3" | ||
}, | ||
@@ -64,0 +65,0 @@ "optionalDependencies": { |
Sorry, the diff of this file is not supported yet
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
206039
1505
14