empty-strings-nuller
TypeScript icon, indicating that this package has built-in type declarations

1.0.7 • Public • Published

Empty Strings Nuller

Replaces all fields with empty string in object with null:

const obj = { a: "a", b: "" };
nullEmptyStrings(obj); // => { a: "a", b: null }

Works also on nested objects or objects in array.

Installation

$ npm i empty-strings-nuller

Import

Use in a stadard way:

import nullEmptyStrings from "empty-strings-nuller";

or

const nullEmptyStrings = require("empty-strings-nuller");

Readme

Keywords

none

Package Sidebar

Install

npm i empty-strings-nuller

Weekly Downloads

1

Version

1.0.7

License

ISC

Unpacked Size

1.74 kB

Total Files

5

Last publish

Collaborators

  • jiprochazka