Comparing version 17.5.0 to 17.6.0
@@ -388,2 +388,19 @@ 'use strict'; | ||
length(item) { | ||
if (typeof item === 'string') { | ||
return item.length; | ||
} | ||
if (!item || typeof item !== 'object') { | ||
return null; | ||
} | ||
if (Array.isArray(item)) { | ||
return item.length; | ||
} | ||
return Object.keys(item).length; | ||
}, | ||
msg(code) { | ||
@@ -390,0 +407,0 @@ |
{ | ||
"name": "joi", | ||
"description": "Object schema validation", | ||
"version": "17.5.0", | ||
"version": "17.6.0", | ||
"repository": "git://github.com/sideway/joi", | ||
@@ -6,0 +6,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is too big to display
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
518908
9640