@extra-array/group
Version:
Breaks array keeping similar values together.
12 lines (11 loc) • 394 B
TypeScript
declare module "@extra-array/group" {
import type { compareFn, mapFn } from "./_types";
/**
* Breaks array keeping similar values together.
* @param x an array
* @param fc compare function (a, b)
* @param fm map function (v, i, x)
*/
declare function group<T, U = T>(x: Iterable<T>, fc?: compareFn<T | U>, fm?: mapFn<T, T | U>): T[][];
export = group;
//# sourceMappingURL=group.d.ts.map}