arrayValue
functionBuild a SerializationSchema for an array whose entries are each coerced by `item`. A non-array value (including `undefined`) yields the empty array, which is the recoverable default.
Import
import { arrayValue } from '@modular/sdk/editor';Notes
- example
- ```ts const parseIds = arrayValue(stringValue()); // ^? SerializationSchema<string[]> parseIds(['a', 'b']); // ['a', 'b'] parseIds('nope'); // [] ```
- __NO_SIDE_EFFECTS__