UNPKG

@qntm-code/utils

Version:

A collection of useful utility functions with associated TypeScript types. All functions have been unit tested.

7 lines (6 loc) 181 B
/** * Checks the provided value is an array and if not returns the value within an array. */ export function toArray(value) { return Array.isArray(value) ? value : [value]; }