mirror of
https://github.com/toss/es-toolkit.git
synced 2024-11-28 20:26:33 +03:00
14 lines
382 B
TypeScript
14 lines
382 B
TypeScript
import { bench, describe } from 'vitest';
|
|
import { takeWhile as takeWhileToolkit } from 'es-toolkit';
|
|
import { takeWhile as takeWhileLodash } from 'lodash';
|
|
|
|
describe('takeWhile', () => {
|
|
bench('es-toolkit/takeWhile', () => {
|
|
takeWhileToolkit([5, 4, 3, 2, 1], n => n < 4);
|
|
});
|
|
|
|
bench('lodash/takeWhile', () => {
|
|
takeWhileLodash([5, 4, 3, 2, 1], n => n < 4);
|
|
});
|
|
});
|