UNPKG

@qntm-code/utils

Version:

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

11 lines (10 loc) 304 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.toArray = void 0; /** * Checks the provided value is an array and if not returns the value within an array. */ function toArray(value) { return Array.isArray(value) ? value : [value]; } exports.toArray = toArray;