MCPcopy Index your code
hub / github.com/statelyai/xstate / toArrayStrict

Function toArrayStrict

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

Source from the content-addressed store, hash-verified

142}
143
144function toArrayStrict<T>(value: readonly T[] | T): readonly T[] {
145 if (isArray(value)) {
146 return value;
147 }
148 return [value];
149}
150
151export function toArray<T>(value: readonly T[] | T | undefined): readonly T[] {
152 if (value === undefined) {

Callers 2

toArrayFunction · 0.85
toTransitionConfigArrayFunction · 0.85

Calls 1

isArrayFunction · 0.85

Tested by

no test coverage detected