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.6.2 to 0.6.4

25

package.json
{
"name": "cleaner-node",
"version": "0.6.2",
"version": "0.6.4",
"description": "Helpful utilities and scripts to make Node projects more legible and easier for the next developer to take over.",
"main": "index.js",
"scripts": {
"test": "eslint src/**/*.js",
"test:fix": "eslint --fix src/**/*.js"
"lint": "eslint src/**/*.js",
"lint:fix": "eslint --fix src/**/*.js"
},

@@ -35,11 +35,11 @@ "repository": {

"dependencies": {
"camelcase": "^5.0.0",
"camelcase": "^5.3.1",
"email-addresses": "^3.0.3",
"gravatar": "^1.6.0",
"gravatar": "^1.8.0",
"is-html": "^1.1.0",
"jsonwebtoken": "^8.4.0",
"jsonwebtoken": "^8.5.1",
"know-your-http-well": "^0.5.0",
"md5-file": "^4.0.0",
"moment": "^2.22.2",
"semver": "^5.6.0",
"moment": "^2.24.0",
"semver": "^5.7.0",
"uuid": "^3.3.2",

@@ -49,10 +49,11 @@ "uuid-validate": "0.0.3"

"devDependencies": {
"eslint": "^5.9.0",
"eslint": "^5.16.0",
"eslint-config-airbnb": "^17.1.0",
"eslint-config-standard": "^12.0.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-node": "^8.0.0",
"eslint-plugin-promise": "^4.0.1",
"eslint-plugin-import": "^2.16.0",
"eslint-plugin-node": "^8.0.1",
"eslint-plugin-promise": "^4.1.1",
"eslint-plugin-react": "^7.12.4",
"eslint-plugin-standard": "^4.0.0"
}
}

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

| 0.6.0 | 2019/04/06 | Add `express` area with `.asyncMiddleware` wrapper / function. |
| 0.6.4 | 2019/04/12 | Add `.isJSON` to `strings`. |

@@ -11,2 +11,2 @@ const asyncMiddleware = (fn) => {

wrap : asyncMiddleware
};
};

@@ -247,2 +247,15 @@ const cc = require('camelcase');

const isJSON = value => {
if (!isValid(value)) { return false; }
if (value.length < 2) { return false; }
if (!(value.startsWith('"') && value.endsWith('"')) &&
!(value.startsWith('{') && value.endsWith('}'))) { return false; }
try {
const obj = JSON.parse(value);
return (typeof obj === 'object');
} catch (ex) {
return false;
}
}
module.exports = {

@@ -289,3 +302,5 @@ isHtml: isHTML,

isBracketted,
trimBrackets
trimBrackets,
isJSON
};
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