MCPcopy
hub / github.com/reflux/refluxjs / bound

Function bound

test/shims/phantomjs-shims.js:16–26  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14 var args = slice.call(arguments, 1);
15
16 function bound() {
17 var invokedAsConstructor = func.prototype && (this instanceof func);
18 return func.apply(
19 // Ignore the context parameter when invoking the bound function
20 // as a constructor. Note that this includes not only constructor
21 // invocations using the new keyword but also calls to base class
22 // constructors such as BaseClass.call(this, ...) or super(...).
23 !invokedAsConstructor && context || this,
24 args.concat(slice.call(arguments))
25 );
26 }
27
28 // The bound function must share the .prototype of the unbound
29 // function so that any object created by one constructor will count

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected