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

Function bind

static/vuejs/vue.js:124–136  ·  view source on GitHub ↗

* Simple bind, faster than native

(fn, ctx)

Source from the content-addressed store, hash-verified

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

Callers 2

initMethodsFunction · 0.70
jstree.jsFile · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected