[Pkg-javascript-commits] [sockjs-client] 97/350: eslint shims
tonnerre at ancient-solutions.com
tonnerre at ancient-solutions.com
Fri Aug 5 01:03:46 UTC 2016
This is an automated email from the git hooks/post-receive script.
tonnerre-guest pushed a commit to branch upstream
in repository sockjs-client.
commit a75ead8b6f31315e1a07614fd5dae1c1f23224c6
Author: Bryce Kahle <bkahle at gmail.com>
Date: Thu Oct 9 00:30:40 2014 -0400
eslint shims
---
lib/shims.js | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/lib/shims.js b/lib/shims.js
index a7348da..cd4f72f 100644
--- a/lib/shims.js
+++ b/lib/shims.js
@@ -7,26 +7,27 @@ if (!Date.now) {
}
if (!Function.prototype.bind) {
+ /* eslint no-extend-native: 0 */
Function.prototype.bind = function (oThis) {
- if (typeof this !== "function") {
+ if (typeof this !== 'function') {
// closest thing possible to the ECMAScript 5
// internal IsCallable function
- throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");
+ throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable');
}
- var aArgs = Array.prototype.slice.call(arguments, 1),
- fToBind = this,
- fNOP = function () {},
- fBound = function () {
- return fToBind.apply(this instanceof fNOP && oThis
+ var aArgs = Array.prototype.slice.call(arguments, 1),
+ self = this,
+ NOP = function () {},
+ Bound = function () {
+ return self.apply(this instanceof NOP && oThis
? this
: oThis,
aArgs.concat(Array.prototype.slice.call(arguments)));
};
- fNOP.prototype = this.prototype;
- fBound.prototype = new fNOP();
+ NOP.prototype = this.prototype;
+ Bound.prototype = new NOP();
- return fBound;
+ return Bound;
};
-}
\ No newline at end of file
+}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/sockjs-client.git
More information about the Pkg-javascript-commits
mailing list