Skip to main content
cngx-src documentation

coerceArray

Functionutils

projects/utils/array.ts

Description#

Coerce a single value or an array to an array. Returns the input unchanged when already an array; wraps a scalar value in a single-element array otherwise.

Signature#

coerceArray(value)

Parameters#

@paramvalue

Returns#

T[]