MCPcopy Create free account
hub / github.com/adopted-ember-addons/validated-changeset / arrayToObject

Function arrayToObject

src/utils/array-object.ts:9–14  ·  view source on GitHub ↗
(array: any[])

Source from the content-addressed store, hash-verified

7}
8
9export function arrayToObject(array: any[]): Record<string, any> {
10 return array.reduce((obj, item, index) => {
11 obj[index] = item;
12 return obj;
13 }, {} as Record<string, any>);
14}
15
16export function objectToArray(obj: Record<string, any>): any[] {
17 let result: any[] = [];

Callers 4

getMethod · 0.90
getMethod · 0.90
unwrapMethod · 0.90
mergeDeepFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…