Home / File/ utils.js — vite Source File

utils.js — vite Source File

Architecture documentation for utils.js, a javascript file in the vite codebase. 0 imports, 1 dependents.

File javascript ViteCore DevServer 1 dependents 1 functions

Entity Profile

Dependency Diagram

graph LR
  0192bf72_c61f_e001_4c94_76ff7d67fe84["utils.js"]
  d44c698e_d1cd_ed19_8d50_613125d5aef6["app.js"]
  d44c698e_d1cd_ed19_8d50_613125d5aef6 --> 0192bf72_c61f_e001_4c94_76ff7d67fe84
  style 0192bf72_c61f_e001_4c94_76ff7d67fe84 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

const escapeHtmlReplaceMap = {
  '&': '&',
  "'": ''',
  '`': '`',
  '"': '"',
  '<': '&lt;',
  '>': '&gt;',
}

/**
 * @param {string} string
 * @returns {string}
 */
export function escapeHtml(string) {
  return string.replace(/[&'`"<>]/g, (match) => escapeHtmlReplaceMap[match])
}

Domain

Subdomains

Functions

Frequently Asked Questions

What does utils.js do?
utils.js is a source file in the vite codebase, written in javascript. It belongs to the ViteCore domain, DevServer subdomain.
What functions are defined in utils.js?
utils.js defines 1 function(s): escapeHtml.
What files import utils.js?
utils.js is imported by 1 file(s): app.js.
Where is utils.js in the architecture?
utils.js is located at playground/ssr/src/utils.js (domain: ViteCore, subdomain: DevServer, directory: playground/ssr/src).

Analyze Your Own Codebase

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

Try Supermodel Free