Sha256: 5e67ca33fc129f60239c34f1617918edb7761ec1e7d8146a4f8e414f87176813
Contents?: true
Size: 578 Bytes
Versions: 14
Compression:
Stored size: 578 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() { return (this instanceof wrapper ? Ctor : func).apply(thisArg, arguments); } return wrapper; } module.exports = createBindWrapper;
Version data entries
14 entries across 7 versions & 1 rubygems