source: imaps-frontend/node_modules/call-bind/index.js@ 79a0317

main
Last change on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 643 bytes
RevLine 
[d565449]1'use strict';
2
3var setFunctionLength = require('set-function-length');
4
5var $defineProperty = require('es-define-property');
[79a0317]6
7var callBindBasic = require('call-bind-apply-helpers');
8var applyBind = require('call-bind-apply-helpers/applyBind');
[d565449]9
10module.exports = function callBind(originalFunction) {
[79a0317]11 var func = callBindBasic(arguments);
12 var adjustedLength = originalFunction.length - (arguments.length - 1);
[d565449]13 return setFunctionLength(
14 func,
[79a0317]15 1 + (adjustedLength > 0 ? adjustedLength : 0),
[d565449]16 true
17 );
18};
19
20if ($defineProperty) {
21 $defineProperty(module.exports, 'apply', { value: applyBind });
22} else {
23 module.exports.apply = applyBind;
24}
Note: See TracBrowser for help on using the repository browser.