es-toolkit/benchmarks/performance/negate.bench.ts
2024-07-17 11:47:39 +09:00

14 lines
332 B
TypeScript

import { bench, describe } from 'vitest';
import { negate as negateToolkit } from 'es-toolkit';
import { negate as negateLodash } from 'lodash';
describe('compact', () => {
bench('es-toolkit', () => {
negateToolkit(() => true)() === false;
});
bench('lodash', () => {
negateLodash(() => true)() === false;
});
});