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
+++ /dev/null
-//! 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)
- },
-})