]> git.codecow.com Git - libnemo.git/commitdiff
Delete unused object converter.
authorChris Duncan <chris@codecow.com>
Tue, 30 Jun 2026 21:00:19 +0000 (14:00 -0700)
committerChris Duncan <chris@codecow.com>
Tue, 30 Jun 2026 21:00:19 +0000 (14:00 -0700)
src/lib/convert/index.ts
src/lib/convert/obj.ts [deleted file]

index 8e5b6e22bdbb2dd049606fe6f321244a33af728d..0034c6212604e13249d6992e73369f0e16196eb7 100644 (file)
@@ -6,5 +6,4 @@ export { bin } from './bin'
 export { bytes } from './bytes'\r
 export { dec } from './dec'\r
 export { hex } from './hex'\r
-export { obj } from './obj'\r
 export { utf8 } from './utf8'\r
diff --git a/src/lib/convert/obj.ts b/src/lib/convert/obj.ts
deleted file mode 100644 (file)
index d701a33..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
-//! 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<number, number>} obj - Object to convert
-        * @returns {Uint8Array} Byte array representation of the input object
-        */
-       toBytes (obj: Record<number, number>): Uint8Array<ArrayBuffer> {
-               const values = Object.keys(obj)
-                       .map(key => +key)
-                       .sort((a, b) => a - b)
-                       .map(i => obj[i])
-               return new Uint8Array(values)
-       },
-})