Home / Function/ isDirtyWithModifiers() — vue Function Reference

isDirtyWithModifiers() — vue Function Reference

Architecture documentation for the isDirtyWithModifiers() function in dom-props.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  11756ad1_34a7_9d83_14e9_46ee1eb34ca1["isDirtyWithModifiers()"]
  cfd60e3b_7f4b_6778_ee1c_4172f3425a17["shouldUpdateValue()"]
  cfd60e3b_7f4b_6778_ee1c_4172f3425a17 -->|calls| 11756ad1_34a7_9d83_14e9_46ee1eb34ca1
  5b855538_2046_796e_16f9_7327a61399cb["isDef()"]
  11756ad1_34a7_9d83_14e9_46ee1eb34ca1 -->|calls| 5b855538_2046_796e_16f9_7327a61399cb
  f5c3f348_7420_2758_1e07_011bdc52d282["toNumber()"]
  11756ad1_34a7_9d83_14e9_46ee1eb34ca1 -->|calls| f5c3f348_7420_2758_1e07_011bdc52d282
  style 11756ad1_34a7_9d83_14e9_46ee1eb34ca1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/platforms/web/runtime/modules/dom-props.ts lines 106–118

function isDirtyWithModifiers(elm: any, newVal: string): boolean {
  const value = elm.value
  const modifiers = elm._vModifiers // injected by v-model runtime
  if (isDef(modifiers)) {
    if (modifiers.number) {
      return toNumber(value) !== toNumber(newVal)
    }
    if (modifiers.trim) {
      return value.trim() !== newVal.trim()
    }
  }
  return value !== newVal
}

Domain

Subdomains

Frequently Asked Questions

What does isDirtyWithModifiers() do?
isDirtyWithModifiers() is a function in the vue codebase.
What does isDirtyWithModifiers() call?
isDirtyWithModifiers() calls 2 function(s): isDef, toNumber.
What calls isDirtyWithModifiers()?
isDirtyWithModifiers() is called by 1 function(s): shouldUpdateValue.

Analyze Your Own Codebase

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

Try Supermodel Free