cleaner-node
Advanced tools
Comparing version 0.10.0 to 0.11.0
{ | ||
"name": "cleaner-node", | ||
"version": "0.10.0", | ||
"version": "0.11.0", | ||
"description": "Helpful utilities and scripts to make Node projects more legible and easier for the next developer to take over.", | ||
@@ -37,3 +37,3 @@ "main": "index.js", | ||
"email-addresses": "^3.1.0", | ||
"gravatar": "^1.8.0", | ||
"gravatar": "^1.8.1", | ||
"html-to-text": "^5.1.1", | ||
@@ -46,18 +46,18 @@ "is-html": "^2.0.0", | ||
"semver": "^7.3.2", | ||
"uuid": "^8.2.0", | ||
"uuid": "^8.3.0", | ||
"uuid-validate": "0.0.3" | ||
}, | ||
"devDependencies": { | ||
"eslint": "^7.3.1", | ||
"eslint": "^7.8.1", | ||
"eslint-config-airbnb": "^18.2.0", | ||
"eslint-config-airbnb-base": "^14.2.0", | ||
"eslint-config-standard": "^14.1.1", | ||
"eslint-plugin-import": "^2.21.2", | ||
"eslint-plugin-import": "^2.22.0", | ||
"eslint-plugin-jsx-a11y": "^6.3.1", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-promise": "^4.2.1", | ||
"eslint-plugin-react": "^7.20.0", | ||
"eslint-plugin-react-hooks": "^4.0.4", | ||
"eslint-plugin-react": "^7.20.6", | ||
"eslint-plugin-react-hooks": "^4.1.0", | ||
"eslint-plugin-standard": "^4.0.1" | ||
} | ||
} |
@@ -52,1 +52,2 @@ # cleaner-node | ||
| 0.10.0 | 2020/06/26 | Add `dates.isIso` && `dates.fromIso`. | | ||
| 0.11.0 | 2020/09/08 | Add `strings.isEnum` && `strings.isEnumName`. | |
@@ -279,2 +279,10 @@ const cc = require('camelcase'); | ||
const isEnumName = (value) => { | ||
if (!isValidChars(value, `${ALPHA}_`)) { return false; } | ||
if (value !== value.toUpperCase()) { return false; } | ||
const parts = value.split('_'); | ||
const valid = parts.filter(isAlpha); | ||
return (parts.length > 0 && parts.length === valid.length); | ||
}; | ||
module.exports = { | ||
@@ -326,3 +334,6 @@ isHtml: isHTML, | ||
getSize, | ||
toSnakeCase | ||
toSnakeCase, | ||
isEnum: isEnumName, | ||
isEnumName | ||
}; |
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
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
76336
1903
53
Updatedgravatar@^1.8.1
Updateduuid@^8.3.0