This repository has been archived on 2026-03-28. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
StasisWarden-Legacy/node_modules/es-toolkit/dist/compat/array/unzip.mjs
T

15 lines
449 B
JavaScript

import { unzip as unzip$1 } from '../../array/unzip.mjs';
import { isArray } from '../predicate/isArray.mjs';
import { isArrayLikeObject } from '../predicate/isArrayLikeObject.mjs';
function unzip(array) {
if (!isArrayLikeObject(array) || !array.length) {
return [];
}
array = isArray(array) ? array : Array.from(array);
array = array.filter(item => isArrayLikeObject(item));
return unzip$1(array);
}
export { unzip };