MCPcopy Index your code
hub / github.com/angular-ui/ui-router / bind

Function bind

test/angular/1.3/angular.js:999–1017  ·  view source on GitHub ↗
(self, fn)

Source from the content-addressed store, hash-verified

997 */
998/* jshint +W101 */
999function bind(self, fn) {
1000 var curryArgs = arguments.length > 2 ? sliceArgs(arguments, 2) : [];
1001 if (isFunction(fn) && !(fn instanceof RegExp)) {
1002 return curryArgs.length
1003 ? function() {
1004 return arguments.length
1005 ? fn.apply(self, concat(curryArgs, arguments, 0))
1006 : fn.apply(self, curryArgs);
1007 }
1008 : function() {
1009 return arguments.length
1010 ? fn.apply(self, arguments)
1011 : fn.call(self);
1012 };
1013 } else {
1014 // in IE, native methods are not functions so they cannot be bound (note: they don't need to be)
1015 return fn;
1016 }
1017}
1018
1019
1020function toJsonReplacer(key, value) {

Callers 1

getterFunction · 0.70

Calls 3

sliceArgsFunction · 0.70
isFunctionFunction · 0.70
concatFunction · 0.70

Tested by

no test coverage detected