From 73b3b64a7b62117a63f9550bbb7d4cfd5120e610 Mon Sep 17 00:00:00 2001 From: Ilias Tsangaris Date: Tue, 20 Jun 2023 14:30:03 -0400 Subject: [PATCH] Add clearer behavior to readme (#84) --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index a0e54a7..4ac5497 100644 --- a/README.md +++ b/README.md @@ -20,3 +20,16 @@ import removeUndefinedObjects from 'remove-undefined-objects'; console.log(removeUndefinedObjects({key: [], key2: 123})); // { key2: 123 } ``` + +## Behavior + +Any items with the following value will be removed: + +* Empty object, `{}` +* Empty array, `[]` +* Undefined, `undefined` + +The following items will NOT be removed: + +* Empty string, `''` +* Null, `null`