New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

body-checker

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

body-checker - npm Package Compare versions

Comparing version

to
0.1.2

.travis.yml

2

package.json
{
"name": "body-checker",
"version": "0.1.1",
"version": "0.1.2",
"description": "A simple tool to protect your API against bad request parameters",

@@ -5,0 +5,0 @@ "main": "index.js",

# Body Checker
> A simple tool to protect your API against bad request parameters
[![NPM](https://nodei.co/npm/body-checker.png?downloads=true&stars=true)](https://nodei.co/npm/body-checker/)
[![Build Status](https://travis-ci.org/luceracloud/body-checker.svg?branch=master)](https://travis-ci.org/luceracloud/body-checker)
## Installation

@@ -17,3 +21,3 @@

#### Body to validate
This is the object or request parameters (`req.body` in express) that you want to validate.
This is the request object (`req.body` in express) that you want to validate.
Currently we only support shallow objects, but if there is an overwhelming need for deep objects, let us know in the issues and we will implement deep validation.

@@ -48,3 +52,3 @@

#### Callback
Callback is a traditional callback that passes back a detailed error message or the final `req.body` object. The library passes back detailed errors for debugging, but allows you to send your own generic error to the client. This will prevent phishing attacks. See example below.
Callback is a traditional callback(err, data) function. It will pass back detailed errors for debugging or the final `req.body` object. This allows you to send your own generic error to the client to prevent phishing attacks. See example below.

@@ -51,0 +55,0 @@ ## Examples