Home / Function/ validateRegExp() — fastify Function Reference

validateRegExp() — fastify Function Reference

Architecture documentation for the validateRegExp() function in content-type-parser.js from the fastify codebase.

Entity Profile

Dependency Diagram

graph TD
  5735efa4_5eb9_ac60_1a38_e8b97b6a9ae2["validateRegExp()"]
  b47c11f3_fe3b_64dc_0f58_921e5921ec45["content-type-parser.js"]
  5735efa4_5eb9_ac60_1a38_e8b97b6a9ae2 -->|defined in| b47c11f3_fe3b_64dc_0f58_921e5921ec45
  0263d1e1_98f0_1273_d326_dcda379097b2["add()"]
  0263d1e1_98f0_1273_d326_dcda379097b2 -->|calls| 5735efa4_5eb9_ac60_1a38_e8b97b6a9ae2
  style 5735efa4_5eb9_ac60_1a38_e8b97b6a9ae2 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

lib/content-type-parser.js lines 392–399

function validateRegExp (regexp) {
  // RegExp should either start with ^ or include ;?
  // It can ensure the user is properly detect the essence
  // MIME types.
  if (regexp.source[0] !== '^' && regexp.source.includes(';?') === false) {
    FSTSEC001(regexp.source)
  }
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does validateRegExp() do?
validateRegExp() is a function in the fastify codebase, defined in lib/content-type-parser.js.
Where is validateRegExp() defined?
validateRegExp() is defined in lib/content-type-parser.js at line 392.
What calls validateRegExp()?
validateRegExp() is called by 1 function(s): add.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free