Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

checkv

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

checkv - npm Package Compare versions

Comparing version 0.0.16 to 0.0.17

3

lib/Check.js

@@ -57,2 +57,5 @@ 'use strict'

case 'isEmail':
case 'isPinCode':
case 'isPhone':
case 'isHex':
_match = _compare === validate.string[rule](value)

@@ -59,0 +62,0 @@ break

@@ -19,2 +19,23 @@ 'use strict'

return (/^[\w\.-]+@[\w\.-]+$/i).test(value)
},
isPinCode: function (value) {
if (!value || !string.isString(value)) {
return false
}
return (/^[\d]+$/).test(value)
},
isPhone: function (value) {
if (!value || !string.isString(value) || !string.isLonger(value, 2)) {
return false
}
if ((/^\+?[\d .]+$/).test(value)) {
return value.replace(/[+ .]/g, '').length > 2
}
return false
},
isHex: function (value) {
if (!value || !string.isString(value)) {
return false
}
return (/^[\da-f]+$/i).test(value)
}

@@ -21,0 +42,0 @@ }

2

package.json
{
"name": "checkv",
"version": "0.0.16",
"version": "0.0.17",
"description": "javascript idiomatic validator",

@@ -5,0 +5,0 @@ "main": "main.js",

@@ -37,2 +37,4 @@ # checkv

checkv('simone@braceslab.com', { isEmail: true }) // return true
checkv('+39 345 123 34 56', { isPhone: true }) // return true
checkv('ff39aa345bc12b3e34d56d', { isHex: true }) // return true
checkv('Frank', { isIn: ['Frank', 'Paul', 'Alex', 'Maurice'] }) // return true

@@ -39,0 +41,0 @@

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