Home / Function/ hexToBytes() — drizzle-orm Function Reference

hexToBytes() — drizzle-orm Function Reference

Architecture documentation for the hexToBytes() function in utils.ts from the drizzle-orm codebase.

Entity Profile

Dependency Diagram

graph TD
  684c87aa_1990_661f_9c9f_09fcb59ef8fb["hexToBytes()"]
  d9ea5377_af3f_15e9_beae_7a6f5f0fdae1["utils.ts"]
  684c87aa_1990_661f_9c9f_09fcb59ef8fb -->|defined in| d9ea5377_af3f_15e9_beae_7a6f5f0fdae1
  f11396d6_9691_dc26_0520_3fcea22d6660["parseEWKB()"]
  f11396d6_9691_dc26_0520_3fcea22d6660 -->|calls| 684c87aa_1990_661f_9c9f_09fcb59ef8fb
  style 684c87aa_1990_661f_9c9f_09fcb59ef8fb fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-orm/src/pg-core/columns/postgis_extension/utils.ts lines 1–7

function hexToBytes(hex: string): Uint8Array {
	const bytes: number[] = [];
	for (let c = 0; c < hex.length; c += 2) {
		bytes.push(Number.parseInt(hex.slice(c, c + 2), 16));
	}
	return new Uint8Array(bytes);
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does hexToBytes() do?
hexToBytes() is a function in the drizzle-orm codebase, defined in drizzle-orm/src/pg-core/columns/postgis_extension/utils.ts.
Where is hexToBytes() defined?
hexToBytes() is defined in drizzle-orm/src/pg-core/columns/postgis_extension/utils.ts at line 1.
What calls hexToBytes()?
hexToBytes() is called by 1 function(s): parseEWKB.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free