Comparing version 1.1.0 to 1.1.1
{ | ||
"name": "groom", | ||
"version": "1.1.0", | ||
"description": "JSON.parse(JSON.stringify(myObject)) and remove all nulls and empty strings", | ||
"version": "1.1.1", | ||
"description": "JSON.parse(JSON.stringify(myObject)) and remove all nulls, undefined and empty strings", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "_mocha" | ||
"test": "mocha" | ||
}, | ||
@@ -9,0 +9,0 @@ "repository": { |
@@ -1,2 +0,5 @@ | ||
# groom | ||
# groom [![Build Status](https://travis-ci.org/e-conomic/groom.svg?branch=master)](https://travis-ci.org/e-conomic/groom) | ||
[![npm package](https://nodei.co/npm/groom.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/groom/) | ||
Does JSON.parse(JSON.stringify(myObject)) and removes all nulls, undefined and empty strings. | ||
@@ -16,10 +19,18 @@ | ||
'test' | ||
] | ||
], | ||
f: new Date(0), | ||
g: /test/ | ||
}; | ||
console.log(o) | ||
console.log(groom(o)); | ||
//output: | ||
{ | ||
a: 1, | ||
e: ["test"] | ||
e: ["test"], | ||
f: '1970-01-01T00:00:00.000Z', | ||
g: {} | ||
} | ||
``` | ||
Dates are .toString()'ed and regExp'es are turned into the empty object `{}`. | ||
The original object stays the same. A copy without null, undefined and empty string is created. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35
2059
5
1