New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

cleanzr

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cleanzr

Removes null, undefined, empty strings, or NaN values from an object recursively.

latest
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

🧼 Cleanzr

Removes null, undefined, empty strings, or NaN values from objects recursively.

Perfect for cleaning API payloads or form data before submission.

🚀 Installation

npm install cleanzr

or with Yarn:

yarn add cleanzr

🧩 Usage

import { cleanzr } from "cleanzr";

const data = {
  name: "",
  age: null,
  address: { city: "New York", zip: undefined },
  score: NaN,
};

const cleaned = cleanzr(data);
// => { address: { city: "New York" } }

⚙️ Features

  • Recursively removes unwanted values.
  • Works with arrays and nested objects.
  • TypeScript and JavaScript compatible.

🪪 License

MIT © 2025 Vinod Selvin

If you like maskly, please ⭐ it on npm or GitHub!

Keywords

clean

FAQs

Package last updated on 28 Oct 2025

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