MCPcopy Index your code
hub / github.com/loopbackio/loopback-next / isInstance

Method isInstance

packages/repository/src/types/array.ts:19–26  ·  view source on GitHub ↗
(value: any)

Source from the content-addressed store, hash-verified

17 readonly name = 'array';
18
19 isInstance(value: any) {
20 if (value == null) return true;
21 if (!Array.isArray(value)) {
22 return false;
23 }
24 const list = value as (T | null | undefined)[];
25 return list.every(i => this.itemType.isInstance(i));
26 }
27
28 isCoercible(value: any): boolean {
29 if (value == null) return true;

Callers

nothing calls this directly

Calls 1

isInstanceMethod · 0.65

Tested by

no test coverage detected