MCPcopy Create free account
hub / github.com/expressjs/body-parser / typeChecker

Function typeChecker

lib/utils.js:25–29  ·  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

23 * @private
24 */
25function typeChecker (type) {
26 return function checkType (req) {
27 return Boolean(typeis(req, type))
28 }
29}
30
31/**
32 * Normalizes the common options for all parsers.

Callers 1

normalizeOptionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected