UNPKG

741 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.query = exports.param = exports.header = exports.cookie = exports.body = exports.check = exports.buildCheckFunction = void 0;
4const check_1 = require("./check");
5function buildCheckFunction(locations) {
6 return (fields, message) => check_1.check(fields, locations, message);
7}
8exports.buildCheckFunction = buildCheckFunction;
9exports.check = buildCheckFunction(['body', 'cookies', 'headers', 'params', 'query']);
10exports.body = buildCheckFunction(['body']);
11exports.cookie = buildCheckFunction(['cookies']);
12exports.header = buildCheckFunction(['headers']);
13exports.param = buildCheckFunction(['params']);
14exports.query = buildCheckFunction(['query']);