decord/alpha/source/lib/zipWithNext.tsx

32 lines
670 B
TypeScript
Raw Permalink Normal View History

2026-10-10 08:08:14 +00:00
// Module ID: 5216
// Function ID: 5217
2026-07-20 16:05:17 +00:00
// Name: zipWithNext
2026-07-23 10:11:24 +00:00
// Dependencies: [2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-10-10 08:08:14 +00:00
// Module 5216 (zipWithNext)
import size from "module_2" /* 2 */;
2026-08-24 06:08:38 +00:00
const result = size.fileFinishedImporting("lib/zipWithNext.tsx");
2026-07-20 16:05:17 +00:00
export default function zipWithNext(arg0, fn) {
2026-07-20 16:05:17 +00:00
let length;
if (arg0.length < 2) {
return [];
} else {
const items = [];
let first = arg0[0];
let num2 = 1;
if (1 < arg0.length) {
do {
let tmp2 = arg0[num2];
let arr = items.push(fn(first, tmp2));
2026-07-20 16:05:17 +00:00
num2 = num2 + 1;
first = tmp2;
length = arg0.length;
} while (num2 < length);
}
return items;
}
};