diff options
Diffstat (limited to 'node_modules/es5-ext/function/#/lock.js')
-rw-r--r-- | node_modules/es5-ext/function/#/lock.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/node_modules/es5-ext/function/#/lock.js b/node_modules/es5-ext/function/#/lock.js new file mode 100644 index 000000000..dcd93bb10 --- /dev/null +++ b/node_modules/es5-ext/function/#/lock.js @@ -0,0 +1,14 @@ +"use strict"; + +var callable = require("../../object/valid-callable") + + , apply = Function.prototype.apply; + +module.exports = function (/* …args*/) { + var fn = callable(this) + , args = arguments; + + return function () { + return apply.call(fn, this, args); +}; +}; |