Exempt getUID() from ESLint's no-bitwise rule

[skip sauce]
[skip validator]
This commit is contained in:
Chris Rebert 2015-11-30 23:53:25 -08:00
parent 56a6d964e0
commit ad4c0ee52f
1 changed files with 2 additions and 0 deletions

View File

@ -99,7 +99,9 @@ const Util = (($) => {
getUID(prefix) {
do {
/* eslint-disable no-bitwise */
prefix += ~~(Math.random() * 1000000) // "~~" acts like a faster Math.floor() here
/* eslint-enable no-bitwise */
} while (document.getElementById(prefix))
return prefix
},