UNPKG

es-toolkit

Version:

A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.

13 lines (9 loc) 261 B
'use strict'; Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); function castArray(value) { if (arguments.length === 0) { return []; } return Array.isArray(value) ? value : [value]; } exports.castArray = castArray;