INNER CODE UNIT · JavaScript
FIRST_NON_WHITESPACE_REGEXP
expressjs/body-parser · lib/types/json.js:36
const FIRST_NON_WHITESPACE_REGEXP = /^[\x20\x09\x0a\x0d]*([^\x20\x09\x0a\x0d]|$)/ // eslint-disable-line no-control-regex
const JSON_SYNTAX_CHAR = '#'
const JSON_SYNTAX_REGEXP = /#+/g
/**
* Create a middleware to parse JSON bodies.
*
* @param {Object} [options]
* @returns {Function}
* @public
*/
function json (options) {
const normalizedOptions = normalizeOptions(options, 'application/json')
const parse = createJsonParser(options)
const readOptions = {