MCPcopy Create free account
hub / github.com/Exrick/xpay / createBindWrapper

Function createBindWrapper

xpay-code/src/main/resources/static/swagger/swagger-ui.js:15859–15867  ·  view source on GitHub ↗

* Creates a function that wraps `func` and invokes it with the `this` * binding of `thisArg`. * * @private * @param {Function} func The function to bind. * @param {*} [thisArg] The `this` binding of `func`. * @returns {Function} Returns the new bound function.

(func, thisArg)

Source from the content-addressed store, hash-verified

15857 * @returns {Function} Returns the new bound function.
15858 */
15859function createBindWrapper(func, thisArg) {
15860 var Ctor = createCtorWrapper(func);
15861
15862 function wrapper() {
15863 var fn = (this && this !== global && this instanceof wrapper) ? Ctor : func;
15864 return fn.apply(thisArg, arguments);
15865 }
15866 return wrapper;
15867}
15868
15869module.exports = createBindWrapper;
15870

Callers 1

createWrapperFunction · 0.85

Calls 1

createCtorWrapperFunction · 0.85

Tested by

no test coverage detected