Home / Function/ genFilterCode() — vue Function Reference

genFilterCode() — vue Function Reference

Architecture documentation for the genFilterCode() function in events.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  bc43c3cd_e45a_a527_557d_393fa5a795f6["genFilterCode()"]
  53156b1d_131d_a4d4_4575_daa92ec38378["events.ts"]
  bc43c3cd_e45a_a527_557d_393fa5a795f6 -->|defined in| 53156b1d_131d_a4d4_4575_daa92ec38378
  style bc43c3cd_e45a_a527_557d_393fa5a795f6 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/compiler/codegen/events.ts lines 155–170

function genFilterCode(key: string): string {
  const keyVal = parseInt(key, 10)
  if (keyVal) {
    return `$event.keyCode!==${keyVal}`
  }
  const keyCode = keyCodes[key]
  const keyName = keyNames[key]
  return (
    `_k($event.keyCode,` +
    `${JSON.stringify(key)},` +
    `${JSON.stringify(keyCode)},` +
    `$event.key,` +
    `${JSON.stringify(keyName)}` +
    `)`
  )
}

Domain

Subdomains

Frequently Asked Questions

What does genFilterCode() do?
genFilterCode() is a function in the vue codebase, defined in src/compiler/codegen/events.ts.
Where is genFilterCode() defined?
genFilterCode() is defined in src/compiler/codegen/events.ts at line 155.

Analyze Your Own Codebase

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

Try Supermodel Free