Skip to main content
Version: 1.0.2

๐ŸŽ๏ธ Benchmark

https://runkit.com/karbashevskyi/benchmark-is-is-js-thiis

thiisโ€‹

https://www.npmjs.com/package/thiis

Caseโ€‹

    if (thiis.is.object.not.empty(data)) {
// ...
}

Result: thiis x 378,605 ops/sec ยฑ4.04% (75 runs sampled)

isโ€‹

https://www.npmjs.com/package/is

Caseโ€‹

    if (is.object(data) && !is.empty(data)) {
// ...
}

Result: is x 676,884 ops/sec ยฑ7.69% (66 runs sampled)

is_jsโ€‹

https://www.npmjs.com/package/is_js

Caseโ€‹

    if (is_js.object(data) && is_js.not.empty(data)) {
// ...
}

Result: is_js x 562,565 ops/sec ยฑ4.56% (77 runs sampled)

Conclusionโ€‹

For now, it is better to use this package only on the client side, and for lightly loaded projects.

A new version is being prepared that will speed up the work of the pack, if you intend to help, don't delay and connect!