MCPcopy
hub / github.com/statelyai/xstate / toArray

Function toArray

packages/core/src/utils.ts:151–156  ·  view source on GitHub ↗
(value: readonly T[] | T | undefined)

Source from the content-addressed store, hash-verified

149}
150
151export function toArray<T>(value: readonly T[] | T | undefined): readonly T[] {
152 if (value === undefined) {
153 return [];
154 }
155 return toArrayStrict(value);
156}
157
158export function resolveOutput<
159 TContext extends MachineContext,

Callers 7

getDelayedTransitionsFunction · 0.90
formatTransitionFunction · 0.90
formatInitialTransitionFunction · 0.90
assertEventFunction · 0.90
constructorMethod · 0.90
invokeMethod · 0.90
normalizeTargetFunction · 0.85

Calls 1

toArrayStrictFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…