Skip to content

Util to remove empty string, undefined, null and empty arrays in nested objects and arrays

Notifications You must be signed in to change notification settings

webinmove/hakuna-tupu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HakunaTupu

Description

Hakuna Tupu means "no empty" in Swahili.

Util to remove empty string, undefined, null and empty arrays in nested objects and arrays

Here is an exemple:

const hakunaTupu = new HakunaTupu({
  removeEmptyArrays: true,
  removeEmptyObjects: true,
  removeEmptyStrings: true,
  removeUndefined: true,
  removeNull: true
});

const result = hakunaTupu.removeEmpty(objectToEmpty);

About

Util to remove empty string, undefined, null and empty arrays in nested objects and arrays

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •