MCPcopy
hub / github.com/chartjs/Chart.js / isArray

Function isArray

src/helpers/helpers.core.ts:37–46  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

35 * @function
36 */
37export function isArray<T = unknown>(value: unknown): value is T[] {
38 if (Array.isArray && Array.isArray(value)) {
39 return true;
40 }
41 const type = Object.prototype.toString.call(value);
42 if (type.slice(0, 7) === '[object' && type.slice(-6) === 'Array]') {
43 return true;
44 }
45 return false;
46}
47
48/**
49 * Returns true if `value` is an object (excluding null), else returns false.

Callers 15

parseValueFunction · 0.85
configureMethod · 0.85
parseMethod · 0.85
needContextFunction · 0.85
valuesFunction · 0.85
getTitleHeightFunction · 0.85
_computeLabelSizesMethod · 0.85
_computeLabelItemsMethod · 0.85
drawTitleMethod · 0.85
_resolveWithContextFunction · 0.85
subGetTargetFunction · 0.85
resolveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…