source: node_modules/es-toolkit/dist/compat/array/unzip.js

Last change on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago

Added visualizations

  • Property mode set to 100644
File size: 584 bytes
RevLine 
[a762898]1'use strict';
2
3Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
5const unzip$1 = require('../../array/unzip.js');
6const isArray = require('../predicate/isArray.js');
7const isArrayLikeObject = require('../predicate/isArrayLikeObject.js');
8
9function unzip(array) {
10 if (!isArrayLikeObject.isArrayLikeObject(array) || !array.length) {
11 return [];
12 }
13 array = isArray.isArray(array) ? array : Array.from(array);
14 array = array.filter(item => isArrayLikeObject.isArrayLikeObject(item));
15 return unzip$1.unzip(array);
16}
17
18exports.unzip = unzip;
Note: See TracBrowser for help on using the repository browser.