removeArrayWrappers(array): any[]
Recursively removes unnecessary array wrappers from a nested array structure. If an element in the array is itself an array with only one element, it replaces that element with its single value. If the element is a nested array with more than one element, the function is called recursively on that nested array.

Parameters

ParameterTypeDescription
arrayany[]The array to process, which may contain nested arrays.

Returns

any[] A new array with unnecessary wrappers removed, where single-element arrays are replaced by their single value.

Defined in

src/parsing/internal-parsing-logic.ts:662