MCPcopy Create free account
hub / github.com/TruthHun/BookStack / bind

Function bind

static/vuejs/vue.runtime.esm.js:118–130  ·  view source on GitHub ↗

* Simple bind, faster than native

(fn, ctx)

Source from the content-addressed store, hash-verified

116 * Simple bind, faster than native
117 */
118function bind (fn, ctx) {
119 function boundFn (a) {
120 var l = arguments.length;
121 return l
122 ? l > 1
123 ? fn.apply(ctx, arguments)
124 : fn.call(ctx, a)
125 : fn.call(ctx)
126 }
127 // record original fn length
128 boundFn._length = fn.length;
129 return boundFn
130}
131
132/**
133 * Convert an Array-like object to a real Array.

Callers 1

initMethodsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected