Sha256: f662ff077521b835d42733a66292c09c26b8191d6e3ce6e5d9f7ce555cfdfec7
Contents?: true
Size: 622 Bytes
Versions: 153
Compression:
Stored size: 622 Bytes
Contents
var createCtorWrapper = require('./createCtorWrapper'); /** * 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. */ function createBindWrapper(func, thisArg) { var Ctor = createCtorWrapper(func); function wrapper() { var fn = (this && this !== global && this instanceof wrapper) ? Ctor : func; return fn.apply(thisArg, arguments); } return wrapper; } module.exports = createBindWrapper;
Version data entries
153 entries across 80 versions & 8 rubygems