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

Function isArrayObject

src/utils/array-object.ts:1–7  ·  view source on GitHub ↗
(obj: Record<string, any>)

Source from the content-addressed store, hash-verified

1export function isArrayObject(obj: Record<string, any>) {
2 if (!obj) return false;
3
4 let maybeIndicies = Object.keys(obj);
5
6 return maybeIndicies.every((key) => Number.isInteger(parseInt(key, 10)));
7}
8
9export function arrayToObject(array: any[]): Record<string, any> {
10 return array.reduce((obj, item, index) => {

Callers 2

mergeDeepFunction · 0.90
setDeepFunction · 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…