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

Function bind

lib/test/angular/1.5.0/angular.js:1206–1224  ·  view source on GitHub ↗
(self, fn)

Source from the content-addressed store, hash-verified

1204 */
1205/* jshint +W101 */
1206function bind(self, fn) {
1207 var curryArgs = arguments.length > 2 ? sliceArgs(arguments, 2) : [];
1208 if (isFunction(fn) && !(fn instanceof RegExp)) {
1209 return curryArgs.length
1210 ? function() {
1211 return arguments.length
1212 ? fn.apply(self, concat(curryArgs, arguments, 0))
1213 : fn.apply(self, curryArgs);
1214 }
1215 : function() {
1216 return arguments.length
1217 ? fn.apply(self, arguments)
1218 : fn.call(self);
1219 };
1220 } else {
1221 // in IE, native methods are not functions so they cannot be bound (note: they don't need to be)
1222 return fn;
1223 }
1224}
1225
1226
1227function 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