From 5a35ad6d74c8d9e5aa99a1fc255300a8fd2ac0b4 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Mon, 30 May 2016 23:42:00 -0700 Subject: Use named constants for magic numbers (#19992) Mostly KeyboardEvent.which and MouseEvent.which values. [skip validator] --- js/src/util.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'js/src/util.js') diff --git a/js/src/util.js b/js/src/util.js index dba6e9bd6..070c5ea75 100644 --- a/js/src/util.js +++ b/js/src/util.js @@ -16,6 +16,8 @@ const Util = (($) => { let transition = false + const MAX_UID = 1000000 + const TransitionEndEvent = { WebkitTransition : 'webkitTransitionEnd', MozTransition : 'transitionend', @@ -100,7 +102,7 @@ const Util = (($) => { getUID(prefix) { do { /* eslint-disable no-bitwise */ - prefix += ~~(Math.random() * 1000000) // "~~" acts like a faster Math.floor() here + prefix += ~~(Math.random() * MAX_UID) // "~~" acts like a faster Math.floor() here /* eslint-enable no-bitwise */ } while (document.getElementById(prefix)) return prefix -- cgit v1.2.3 From c4add0c2f30b8404bd1d227b16d7668a236c1d63 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Tue, 31 May 2016 00:45:32 -0700 Subject: Comply with consistent-return ESLint rule --- js/src/util.js | 1 + 1 file changed, 1 insertion(+) (limited to 'js/src/util.js') diff --git a/js/src/util.js b/js/src/util.js index 070c5ea75..b779c448f 100644 --- a/js/src/util.js +++ b/js/src/util.js @@ -42,6 +42,7 @@ const Util = (($) => { if ($(event.target).is(this)) { return event.handleObj.handler.apply(this, arguments) } + return undefined } } } -- cgit v1.2.3 From c955868982e6a6647fa3b722bf42f73f6d513f79 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Sun, 5 Jun 2016 11:17:05 -0700 Subject: Enable more rules from ESLint 2.0; refs #19999 (#20076) [skip sauce] [skip validator] --- js/src/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/src/util.js') diff --git a/js/src/util.js b/js/src/util.js index b779c448f..86d9fe1f4 100644 --- a/js/src/util.js +++ b/js/src/util.js @@ -40,7 +40,7 @@ const Util = (($) => { delegateType: transition.end, handle(event) { if ($(event.target).is(this)) { - return event.handleObj.handler.apply(this, arguments) + return event.handleObj.handler.apply(this, arguments) // eslint-disable-line prefer-rest-params } return undefined } -- cgit v1.2.3 From 24e992a6ffbb3b54424eb1042d49005124b265d9 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Wed, 27 Jul 2016 09:31:24 -0700 Subject: bump versions --- js/src/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/src/util.js') diff --git a/js/src/util.js b/js/src/util.js index 86d9fe1f4..051555268 100644 --- a/js/src/util.js +++ b/js/src/util.js @@ -1,6 +1,6 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v4.0.0-alpha.2): util.js + * Bootstrap (v4.0.0-alpha.3): util.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ -- cgit v1.2.3 From 5495a4b3d383c745065a177d3adb8e5db94acd7f Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 5 Sep 2016 12:41:44 -0700 Subject: versions --- js/src/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/src/util.js') diff --git a/js/src/util.js b/js/src/util.js index 051555268..d117dfcd5 100644 --- a/js/src/util.js +++ b/js/src/util.js @@ -1,6 +1,6 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v4.0.0-alpha.3): util.js + * Bootstrap (v4.0.0-alpha.4): util.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ -- cgit v1.2.3