es-toolkit/benchmarks/takeRight.bench.ts

14 lines
358 B
TypeScript
Raw Normal View History

2024-04-25 14:56:13 +03:00
import { bench, describe } from 'vitest';
import { takeRight as takeRightToolkit } from 'es-toolkit';
import { takeRight as takeRightLodash } from 'lodash';
describe('takeRight', () => {
bench('es-toolkit/takeRight', () => {
2024-04-25 14:56:13 +03:00
takeRightToolkit([1, 2, 3, 4], 2);
});
2024-04-25 14:56:13 +03:00
bench('lodash/takeRight', () => {
2024-04-25 14:56:13 +03:00
takeRightLodash([1, 2, 3, 4], 2);
});
});