|
Last change
on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago |
|
Added visualizations
|
-
Property mode
set to
100644
|
|
File size:
449 bytes
|
| Line | |
|---|
| 1 | import { unzip as unzip$1 } from '../../array/unzip.mjs';
|
|---|
| 2 | import { isArray } from '../predicate/isArray.mjs';
|
|---|
| 3 | import { isArrayLikeObject } from '../predicate/isArrayLikeObject.mjs';
|
|---|
| 4 |
|
|---|
| 5 | function unzip(array) {
|
|---|
| 6 | if (!isArrayLikeObject(array) || !array.length) {
|
|---|
| 7 | return [];
|
|---|
| 8 | }
|
|---|
| 9 | array = isArray(array) ? array : Array.from(array);
|
|---|
| 10 | array = array.filter(item => isArrayLikeObject(item));
|
|---|
| 11 | return unzip$1(array);
|
|---|
| 12 | }
|
|---|
| 13 |
|
|---|
| 14 | export { unzip };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.