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

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

Analyze Your Own Codebase

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

Try Supermodel Free