source:
node_modules/es-toolkit/dist/compat/array/initial.mjs
| Last change on this file was a762898, checked in by , 5 months ago | |
|---|---|
|
|
| File size: 265 bytes | |
| Line | |
|---|---|
| 1 | import { initial as initial$1 } from '../../array/initial.mjs'; |
| 2 | import { isArrayLike } from '../predicate/isArrayLike.mjs'; |
| 3 | |
| 4 | function initial(arr) { |
| 5 | if (!isArrayLike(arr)) { |
| 6 | return []; |
| 7 | } |
| 8 | return initial$1(Array.from(arr)); |
| 9 | } |
| 10 | |
| 11 | export { initial }; |
Note:
See TracBrowser
for help on using the repository browser.
