diff options
Diffstat (limited to 'node_modules/ng-dialog/tests/unit/before.js')
-rw-r--r-- | node_modules/ng-dialog/tests/unit/before.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/node_modules/ng-dialog/tests/unit/before.js b/node_modules/ng-dialog/tests/unit/before.js new file mode 100644 index 0000000000..333656e311 --- /dev/null +++ b/node_modules/ng-dialog/tests/unit/before.js @@ -0,0 +1,18 @@ +if (typeof Function.prototype.bind != 'function') { + Function.prototype.bind = function bind(obj) { + var args = Array.prototype.slice.call(arguments, 1), + self = this, + nop = function() { + }, + bound = function() { + return self.apply( + this instanceof nop ? this : (obj || {}), args.concat( + Array.prototype.slice.call(arguments) + ) + ); + }; + nop.prototype = this.prototype || {}; + bound.prototype = new nop(); + return bound; + }; +} |