Comparing version 16.1.1 to 16.1.2
@@ -148,2 +148,3 @@ 'use strict'; | ||
target = target || {}; | ||
source = source || {}; | ||
@@ -150,0 +151,0 @@ const merged = Object.assign({}, target, source); |
{ | ||
"name": "@hapi/joi", | ||
"description": "Object schema validation", | ||
"version": "16.1.1", | ||
"version": "16.1.2", | ||
"repository": "git://github.com/hapijs/joi", | ||
@@ -6,0 +6,0 @@ "main": "lib/index.js", |
<a href="https://hapi.dev"><img src="https://raw.githubusercontent.com/hapijs/assets/master/images/family.png" width="180px" align="right" /></a> | ||
# joi | ||
# @hapi/joi | ||
@@ -61,3 +61,3 @@ The most powerful schema description language and data validator for JavaScript. | ||
try { | ||
const value = await schema.validate({ username: 'abc', birth_year: 1994 }); | ||
const value = await schema.validateAsync({ username: 'abc', birth_year: 1994 }); | ||
} | ||
@@ -106,6 +106,2 @@ catch (err) { } | ||
const { error, value } = schema.validate({ a: 'a string' }); | ||
// or | ||
schema.validate({ a: 'a string' }, function (error, value) { }); | ||
``` | ||
@@ -123,3 +119,3 @@ | ||
If the schema is a **joi** type, the `schema.validate(value, callback)` can be called directly on the type. When passing a non-type schema object, | ||
If the schema is a **joi** type, the `schema.validate(value)` can be called directly on the type. When passing a non-type schema object, | ||
the module converts it internally to an object() type equivalent to: | ||
@@ -126,0 +122,0 @@ |
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
448398
7581
144