Home / Function/ polyfillBind() — vue Function Reference

polyfillBind() — vue Function Reference

Architecture documentation for the polyfillBind() function in util.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  9b7fe8fb_9619_16f0_cb4a_f9b42794f8b7["polyfillBind()"]
  b7977953_caa1_d867_207c_74cfbf6421e0["util.ts"]
  9b7fe8fb_9619_16f0_cb4a_f9b42794f8b7 -->|defined in| b7977953_caa1_d867_207c_74cfbf6421e0
  style 9b7fe8fb_9619_16f0_cb4a_f9b42794f8b7 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/shared/util.ts lines 209–221

function polyfillBind(fn: Function, ctx: Object): Function {
  function boundFn(a: any) {
    const l = arguments.length
    return l
      ? l > 1
        ? fn.apply(ctx, arguments)
        : fn.call(ctx, a)
      : fn.call(ctx)
  }

  boundFn._length = fn.length
  return boundFn
}

Domain

Subdomains

Defined In

Frequently Asked Questions

What does polyfillBind() do?
polyfillBind() is a function in the vue codebase, defined in src/shared/util.ts.
Where is polyfillBind() defined?
polyfillBind() is defined in src/shared/util.ts at line 209.

Analyze Your Own Codebase

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

Try Supermodel Free