mirror of
https://github.com/toss/es-toolkit.git
synced 2024-12-01 10:45:08 +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]);
|
|
});
|
|
});
|