boolbase

This very simple module provides two basic functions, one that always returns true (trueFunc) and one that always returns false (falseFunc).

Why is this needed?

By having only a single instance of these functions around, it's possible to do some nice optimizations. Eg. css-select uses these functions to determine whether a selector won't match any elements If that's the case, the DOM doesn't even need to be touched.

And why is this a separate module?

I'm trying to modularize css-select and most modules depend on these functions. IMHO, having a separate module is the easiest solution to this problem.

boolbase - Installation

To install boolbase via this registry, you'll need to install via the --registry parameter with your package manager.

n

NPM

npm install boolbase --registry https://js.registry.sudovanilla.org

Learn more about the --registry parameter.

Yarn

yarn config set registry https://js.registry.sudovanilla.org
yarn install boolbase

Learn more about the config option.

PNPM

pnpm install boolbase --registry https://js.registry.sudovanilla.org

Learn more about the --registry parameter.

Bun Logo

Bun

bun install boolbase --registry https://js.registry.sudovanilla.org

Learn more about the --registry parameter.

Learn more about setting this up in your bunfig.toml configuration.


For Deno, add the following to your .npmrc file in your directory:

registry="https://js.registry.sudovanilla.org"

Then run the deno install command.

boolbase - Download

Download Tarball (v2.0.0)

Integrity sha512-DkVaaQHymRhpYEYo9x1oo7Q7B0Y6KJUsjm3c9eTyFDby4MHLBTwZ6ZDWBel5zrYxj1WsZgC5oLpiz+93MluXeA==
SHASUM 832968d211d5c008d833b86e049bb3943036e5b1
Tarball https://js.registry.sudovanilla.org/boolbase/-/boolbase-2.0.0.tgz