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

customMapEntries() — drizzle-orm Function Reference

Architecture documentation for the customMapEntries() function in global.ts from the drizzle-orm codebase.

Entity Profile

Dependency Diagram

graph TD
  ab316ba2_8579_926e_3273_a362d69ba305["customMapEntries()"]
  8f03c4cf_4fdf_b056_3b24_d493cab0cc81["global.ts"]
  ab316ba2_8579_926e_3273_a362d69ba305 -->|defined in| 8f03c4cf_4fdf_b056_3b24_d493cab0cc81
  style ab316ba2_8579_926e_3273_a362d69ba305 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-kit/src/global.ts lines 50–61

export const customMapEntries = <TReturn, T = any>(
	obj: Record<string, T>,
	map: (key: string, value: T) => [string, TReturn],
): Record<string, TReturn> => {
	const result = Object.fromEntries(
		Object.entries(obj).map(([key, val]) => {
			const [newKey, newVal] = map(key, val);
			return [newKey, newVal];
		}),
	);
	return result;
};

Domain

Subdomains

Frequently Asked Questions

What does customMapEntries() do?
customMapEntries() is a function in the drizzle-orm codebase, defined in drizzle-kit/src/global.ts.
Where is customMapEntries() defined?
customMapEntries() is defined in drizzle-kit/src/global.ts at line 50.

Analyze Your Own Codebase

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

Try Supermodel Free