mirror of
https://github.com/toss/es-toolkit.git
synced 2024-11-28 20:26:33 +03:00
14 lines
396 B
TypeScript
14 lines
396 B
TypeScript
import { bench, describe } from 'vitest';
|
|
import { compact as compactToolkit } from 'es-toolkit';
|
|
import { compact as compactLodash } from 'lodash';
|
|
|
|
describe('compact', () => {
|
|
bench('es-toolkit', () => {
|
|
compactToolkit([0, 1, false, 2, '', 3, null, undefined, 4, NaN, 5]);
|
|
});
|
|
|
|
bench('lodash', () => {
|
|
compactLodash([0, 1, false, 2, '', 3, null, undefined, 4, NaN, 5]);
|
|
});
|
|
});
|