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

celebrate

Package Overview
Dependencies
Maintainers
2
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

celebrate - npm Package Compare versions

Comparing version 5.0.1 to 6.0.0

5

lib/index.js

@@ -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++) {

5

package.json
{
"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": {

2

README.md

@@ -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()`

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