
Research
2025 Report: Destructive Malware in Open Source Packages
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.
@bitty/nullish
Advanced tools
@bitty/nullishNullish helper functions and types for TypeScript.
📦 Distributions in ESM, CommonJS, UMD and UMD minified formats.
⚡ Lightweight:
🔋 Bateries included:
🏷 Safe:
This library is published in the NPM registry and can be installed using any compatible package manager.
npm install @bitty/nullish --save
# For Yarn, use the command below.
yarn add @bitty/nullish
This module has a UMD bundle available through JSDelivr and Unpkg CDNs.
<!-- For UNPKG use the code below. -->
<script src="https://unpkg.com/@bitty/nullish"></script>
<!-- For JSDelivr use the code below. -->
<script src="https://cdn.jsdelivr.net/npm/@bitty/nullish"></script>
<script>
// UMD module is exposed through the "isNullish" global function.
console.log(isNullish);
//=> "[Function: isNullish]"
console.log(isNullish(null));
//=> true
</script>
This module default exports isNullish, which is a function that checks if value is nullish.
import isNullish from '@bitty/pipe';
isNullish(null);
//=> true
isNullish(undefined);
//=> true
isNullish(undefined as void);
//=> true
isNullish(NaN);
//=> false
We also exports NonNullish and Nullish types.
Nullish is simply an union of null, void and undefined types.
import { Nullish } from '@bitty/nullish';
let nullish: Nullish;
nullish = null;
nullish = undefined;
nullish = undefined as void;
nullish = false;
//=> throws "Type 'false' is not assignable to type 'Nullish'.".
NonNullish<T> is a type helper that removes nullish types.
import { NonNullish } from '@bitty/nullish';
type Value = string | null | undefined;
const value: NonNullish<Value> = null;
//=> throws "Type 'null' is not assignable to type 'string'.".
Released under MIT License.
FAQs
Nullish helper functions and types for TypeScript.
We found that @bitty/nullish demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

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.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.

Research
/Security News
A five-month operation turned 27 npm packages into durable hosting for browser-run lures that mimic document-sharing portals and Microsoft sign-in, targeting 25 organizations across manufacturing, industrial automation, plastics, and healthcare for credential theft.