Big News: Socket Selected for OpenAI's Cybersecurity Grant Program.Details
Socket
Book a DemoSign in
Socket

boolbase

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

boolbase

two functions: One that returns true, one that returns false

latest
Source
npmnpm
Version
2.0.0
Version published
Weekly downloads
44M
12.77%
Maintainers
1
Weekly downloads
 
Created
Source

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.

Keywords

boolean

FAQs

Package last updated on 17 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts