source: imaps-frontend/node_modules/core-js/internals/function-bind-context.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: 478 bytes
Line 
1'use strict';
2var uncurryThis = require('../internals/function-uncurry-this-clause');
3var aCallable = require('../internals/a-callable');
4var NATIVE_BIND = require('../internals/function-bind-native');
5
6var bind = uncurryThis(uncurryThis.bind);
7
8// optional / simple context binding
9module.exports = function (fn, that) {
10 aCallable(fn);
11 return that === undefined ? fn : NATIVE_BIND ? bind(fn, that) : function (/* ...args */) {
12 return fn.apply(that, arguments);
13 };
14};
Note: See TracBrowser for help on using the repository browser.