Home / Function/ sortCompareFn() — vue Function Reference

sortCompareFn() — vue Function Reference

Architecture documentation for the sortCompareFn() function in scheduler.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  a8cbbaf9_c59b_18ea_696e_cfae66bce728["sortCompareFn()"]
  36c7708b_24b4_08c9_e39f_50f332a4b206["scheduler.ts"]
  a8cbbaf9_c59b_18ea_696e_cfae66bce728 -->|defined in| 36c7708b_24b4_08c9_e39f_50f332a4b206
  style a8cbbaf9_c59b_18ea_696e_cfae66bce728 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/core/observer/scheduler.ts lines 62–69

const sortCompareFn = (a: Watcher, b: Watcher): number => {
  if (a.post) {
    if (!b.post) return 1
  } else if (b.post) {
    return -1
  }
  return a.id - b.id
}

Domain

Subdomains

Frequently Asked Questions

What does sortCompareFn() do?
sortCompareFn() is a function in the vue codebase, defined in src/core/observer/scheduler.ts.
Where is sortCompareFn() defined?
sortCompareFn() is defined in src/core/observer/scheduler.ts at line 62.

Analyze Your Own Codebase

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

Try Supermodel Free