@darkwolf/validator
Advanced tools
Comparing version 13.21.72 to 13.21.73
@@ -126,2 +126,10 @@ const CodeError = require('@darkwolf/code-error') | ||
function isJSON(value) { | ||
try { | ||
return !!JSON.parse(value) | ||
} catch (e) { | ||
return false | ||
} | ||
} | ||
const isTimestamp = value => isInteger(value) && constants.TIMESTAMP_REGEX.test(value) | ||
@@ -205,2 +213,3 @@ const isUnixTimestamp = value => isInteger(value) && constants.UNIX_TIMESTAMP_REGEX.test(value) | ||
isUnique, | ||
isJSON, | ||
isTimestamp, | ||
@@ -207,0 +216,0 @@ isUnixTimestamp, |
{ | ||
"name": "@darkwolf/validator", | ||
"version": "13.21.72", | ||
"version": "13.21.73", | ||
"description": "Validator", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -76,2 +76,3 @@ # Validator | ||
### isUnique(value) | ||
### isJSON(value) | ||
### isTimestamp(value) | ||
@@ -78,0 +79,0 @@ ### isUnixTimestamp(value) |
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
12760
247
91