mirror of
https://github.com/toss/es-toolkit.git
synced 2024-12-01 02:33:54 +03:00
cf65b2c601
* chore: add prettierrc * chore: apply format with prettier config * chore: eslint error fix
16 lines
347 B
TypeScript
16 lines
347 B
TypeScript
import { bench, describe } from 'vitest';
|
|
import { clamp as clampToolkit } from 'es-toolkit';
|
|
import { clamp as clampLodash } from 'lodash';
|
|
|
|
describe('clamp', () => {
|
|
bench('es-toolkit', () => {
|
|
clampToolkit(10, 5, 15);
|
|
clampToolkit(10, 5);
|
|
});
|
|
|
|
bench('lodash', () => {
|
|
clampLodash(10, 5, 15);
|
|
clampLodash(10, 5);
|
|
});
|
|
});
|