MCPcopy
hub / github.com/expressjs/body-parser / typeChecker

Function typeChecker

lib/utils.js:40–44  ·  view source on GitHub ↗

* Get the simple type checker. * * @param {string | string[]} type * @returns {Function} * @private

(type)

Source from the content-addressed store, hash-verified

38 * @private
39 */
40function typeChecker (type) {
41 return function checkType (req) {
42 return Boolean(typeis(req, type))
43 }
44}
45
46/**
47 * Normalizes the common options for all parsers.

Callers 1

normalizeOptionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…