From: Chris Duncan Date: Tue, 30 Jun 2026 21:00:19 +0000 (-0700) Subject: Delete unused object converter. X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=a09507ba4c7426098dcd5a0dec9ce1db7286c80e;p=libnemo.git Delete unused object converter. --- diff --git a/src/lib/convert/index.ts b/src/lib/convert/index.ts index 8e5b6e2..0034c62 100644 --- a/src/lib/convert/index.ts +++ b/src/lib/convert/index.ts @@ -6,5 +6,4 @@ export { bin } from './bin' export { bytes } from './bytes' export { dec } from './dec' export { hex } from './hex' -export { obj } from './obj' export { utf8 } from './utf8' diff --git a/src/lib/convert/obj.ts b/src/lib/convert/obj.ts deleted file mode 100644 index d701a33..0000000 --- a/src/lib/convert/obj.ts +++ /dev/null @@ -1,18 +0,0 @@ -//! SPDX-FileCopyrightText: 2025 Chris Duncan -//! SPDX-License-Identifier: GPL-3.0-or-later - -export const obj = Object.freeze({ - /** - * Convert a numerically-indexed object of 8-bit values to a Uint8Array of bytes. - * - * @param {Record} obj - Object to convert - * @returns {Uint8Array} Byte array representation of the input object - */ - toBytes (obj: Record): Uint8Array { - const values = Object.keys(obj) - .map(key => +key) - .sort((a, b) => a - b) - .map(i => obj[i]) - return new Uint8Array(values) - }, -})