source:
node_modules/es-toolkit/dist/compat/array/castArray.mjs
| Last change on this file was a762898, checked in by , 5 months ago | |
|---|---|
|
|
| File size: 163 bytes | |
| Line | |
|---|---|
| 1 | function castArray(value) { |
| 2 | if (arguments.length === 0) { |
| 3 | return []; |
| 4 | } |
| 5 | return Array.isArray(value) ? value : [value]; |
| 6 | } |
| 7 | |
| 8 | export { castArray }; |
Note:
See TracBrowser
for help on using the repository browser.
