mybase 1.0.37 → 1.0.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/mybase.js +3 -1
  2. package/package.json +1 -1
package/mybase.js CHANGED
@@ -23,7 +23,9 @@ function validHPassword(hpassword) { return (hpassword && hpassword.length === 1
23
23
  function validEmail_old(email) { return (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(email)) }
24
24
 
25
25
  function validEmail(email) {
26
- return validator.isEmail(email)
26
+ if (typeof email==='string')
27
+ return validator.isEmail(email) // validator needs a string
28
+ return false
27
29
  // giving up old style, was not reliable
28
30
  // taken from https://www.w3resource.com/javascript/form/email-validation.php
29
31
  // strange looking emails might be indeed valid
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mybase",
3
- "version": "1.0.37",
3
+ "version": "1.0.38",
4
4
  "description": "",
5
5
  "main": "mybase.js",
6
6
  "scripts": {