UNPKG

@antv/util

Version:

<h1 align="center">@antv/util</h1>

15 lines (13 loc) 431 B
import type { PathArray, AbsoluteArray } from '../types'; import { isPathArray } from './is-path-array'; /** * Iterates an array to check if it's a `PathArray` * with all absolute values. */ export function isAbsoluteArray(path: string | PathArray): path is AbsoluteArray { return ( isPathArray(path) && // @ts-ignore -- `isPathArray` also checks if it's `Array` path.every(([x]) => x === x.toUpperCase()) ); }