@bcts/dcbor 1.0.0-beta.1 → 1.0.0-beta.3
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/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.iife.js +3 -3
- package/dist/index.iife.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -7
package/dist/index.mjs
CHANGED
|
@@ -4828,7 +4828,7 @@ const binary64ToNumber = (data) => {
|
|
|
4828
4828
|
* Convert number to 32-bit float binary (big-endian).
|
|
4829
4829
|
*/
|
|
4830
4830
|
const numberToBinary32 = (n) => {
|
|
4831
|
-
const data = new Uint8Array(4);
|
|
4831
|
+
const data = /* @__PURE__ */ new Uint8Array(4);
|
|
4832
4832
|
import_byte_data.packTo(n, {
|
|
4833
4833
|
bits: 32,
|
|
4834
4834
|
fp: true,
|
|
@@ -4850,7 +4850,7 @@ const binary32ToNumber = (data) => {
|
|
|
4850
4850
|
* Convert number to 16-bit float binary (big-endian).
|
|
4851
4851
|
*/
|
|
4852
4852
|
const numberToBinary16 = (n) => {
|
|
4853
|
-
const data = new Uint8Array(2);
|
|
4853
|
+
const data = /* @__PURE__ */ new Uint8Array(2);
|
|
4854
4854
|
import_byte_data.packTo(n, {
|
|
4855
4855
|
bits: 16,
|
|
4856
4856
|
fp: true,
|
|
@@ -8277,7 +8277,7 @@ function stripLeadingZeros(bytes) {
|
|
|
8277
8277
|
* @returns Big-endian byte representation
|
|
8278
8278
|
*/
|
|
8279
8279
|
function bigintToBytes(value) {
|
|
8280
|
-
if (value === 0n) return new Uint8Array(0);
|
|
8280
|
+
if (value === 0n) return /* @__PURE__ */ new Uint8Array(0);
|
|
8281
8281
|
const hex = value.toString(16);
|
|
8282
8282
|
const padded = hex.length % 2 !== 0 ? `0${hex}` : hex;
|
|
8283
8283
|
const bytes = new Uint8Array(padded.length / 2);
|