core / const
valueIsMaybeSignalValueOfStringOrArray
Checks whether a value, after unwrapping, is a string or array.
Checks whether a value, after unwrapping, is a string or array.
Signature
export const valueIsMaybeSignalValueOfStringOrArray = (input: any): boolean =>
typeof value(input) === "string" || Array.isArray(value(input));
Parameters
input: Any value to check
Returns
true if the unwrapped value is a string or array,
false otherwise
Remarks
- Unwraps signals and non-signals to get the plain value
- Returns true if the plain value is a string or array
- Returns false for other types
- Returns false for
nullandundefined
See Also
- MaybeSignalValue - For the input type
- value - For unwrapping signalified objects