Socket
Socket
Sign inDemoInstall

cleaner-node

Package Overview
Dependencies
Maintainers
1
Versions
175
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cleaner-node - npm Package Compare versions

Comparing version 0.11.7 to 0.12.0

14

package.json
{
"name": "cleaner-node",
"version": "0.11.7",
"version": "0.12.0",
"description": "Helpful utilities and scripts to make Node projects more legible and easier for the next developer to take over.",

@@ -35,6 +35,6 @@ "main": "index.js",

"dependencies": {
"camelcase": "^6.0.0",
"email-addresses": "^3.1.0",
"camelcase": "^6.2.0",
"email-addresses": "^4.0.0",
"gravatar": "^1.8.1",
"html-to-text": "^5.1.1",
"html-to-text": "^7.1.1",
"is-html": "^2.0.0",

@@ -44,5 +44,5 @@ "jsonwebtoken": "^8.5.1",

"md5-file": "^5.0.0",
"moment": "^2.29.0",
"semver": "^7.3.2",
"uuid": "^8.3.0",
"moment": "^2.29.1",
"semver": "^7.3.5",
"uuid": "^8.3.2",
"uuid-validate": "0.0.3"

@@ -49,0 +49,0 @@ },

@@ -54,1 +54,2 @@ # cleaner-node

| 0.11.1 | 2020/09/14 | Add `files.findPackage`. Improved `env` logic. |
| 0.12.0 | 2021/05/06 | Add `objects.circular` & `objects.copy`. |

@@ -301,2 +301,22 @@ const { isValid: isValidString, toCamelCase } = require('./strings');

// safe stringify for circular (MDN official answer)
const getCircularReplacer = () => {
const seen = new WeakSet();
return (key, value) => {
if (typeof value === 'object' && value !== null) {
if (seen.has(value)) {
return;
}
seen.add(value);
}
return value;
};
};
const circular = (item) => {
return JSON.stringify(item, getCircularReplacer());
};
const copy = item => {
return JSON.parse(circular(item));
};
module.exports = {

@@ -325,3 +345,7 @@ findOne,

remove
remove,
circular,
stringify: circular,
copy
};
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc