Comparing version 5.0.1 to 6.0.0
@@ -15,2 +15,7 @@ 'use strict'; | ||
const defaults = { | ||
escapeHtml: true | ||
}; | ||
options = Object.assign(defaults, options); | ||
const keys = Object.keys(schema); | ||
@@ -17,0 +22,0 @@ for (let i = 0; i < keys.length; i++) { |
{ | ||
"name": "celebrate", | ||
"version": "5.0.1", | ||
"version": "6.0.0", | ||
"description": "A joi validation middleware for Express.", | ||
"main": "lib/index.js", | ||
"types": "lib/index.d.ts", | ||
"scripts": { | ||
@@ -29,3 +30,3 @@ "lint": "belly-button -f", | ||
"fastseries": "1.7.2", | ||
"joi": "11.x.x" | ||
"joi": "12.x.x" | ||
}, | ||
@@ -32,0 +33,0 @@ "devDependencies": { |
@@ -73,3 +73,3 @@ ![Celebrate](https://github.com/continuationlabs/celebrate/raw/master/images/logo.png) | ||
- `schema` - a object where `key` can be one of `'params', 'headers', 'query', and 'body'` and the `value` is a [joi](https://github.com/hapijs/joi/blob/master/API.md) validation schema. Only the `key`s specified will be validated against the incoming `req` object. If you omit a key, that part of the `req` object will not be validated. A schema must contain at least one of the valid keys. | ||
- `[options]` - `joi` [options](https://github.com/hapijs/joi/blob/master/API.md#validatevalue-schema-options-callback) that are passed directly into the `validate` function. | ||
- `[options]` - `joi` [options](https://github.com/hapijs/joi/blob/master/API.md#validatevalue-schema-options-callback) that are passed directly into the `validate` function. Defaults to `{ escapeHtml: true }`. This is differs from the Joi defaults since version 12. | ||
@@ -76,0 +76,0 @@ ### `Celebrate.errors()` |
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
9744
117
+ Added@hapi/address@1.0.1(transitive)
+ Addedjoi@12.1.1(transitive)
- Removedisemail@3.2.0(transitive)
- Removedjoi@11.4.0(transitive)
- Removedpunycode@2.3.1(transitive)
Updatedjoi@12.x.x