es-toolkit/benchmarks/performance/isString.bench.ts
uussong b11fd69e17
feat(isString): Add isString function (#379)
* feat(isString): Add isString function

* test(isString): Add isString tests

* docs(isString): Add and improve docs for isString

* Update src/compat/predicate/isString.spec.ts

* Update src/compat/predicate/isString.spec.ts

* Update src/predicate/index.ts

---------

Co-authored-by: Sojin Park <raon0211@gmail.com>
2024-08-15 11:06:47 +09:00

20 lines
490 B
TypeScript

import { bench, describe } from 'vitest';
import { isString as isStringToolkit } from 'es-toolkit';
import { isString as isStringLodash } from 'lodash';
describe('isString', () => {
bench('es-toolkit/isString', () => {
isStringToolkit('');
isStringToolkit(true);
isStringToolkit(undefined);
isStringToolkit(123);
});
bench('lodash/isString', () => {
isStringLodash('');
isStringLodash(true);
isStringLodash(undefined);
isStringLodash(123);
});
});