We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 14b1dd2 commit 0196ed4Copy full SHA for 0196ed4
index.ts
@@ -387,11 +387,11 @@ export function keyByFn<T>(f: (element: T) => string): (array: ArrayLike<T>) =>
387
export function group<T>(array: ArrayLike<T>, compare: Comparator<T>): T[][] {
388
const result: T[][] = [];
389
390
- for (let i = 0; i < array.length; ++i) {
+ outer: for (let i = 0; i < array.length; ++i) {
391
for (let j = 0; j < result.length; ++j) {
392
if (compare(result[j][0], array[i]) === Comparison.equal) {
393
result[j].push(array[i]);
394
- break;
+ continue outer;
395
}
396
397
0 commit comments