diff options
author | marc <mlasch@mailbox.org> | 2019-08-15 14:50:05 +0200 |
---|---|---|
committer | marc <mlasch@mailbox.org> | 2019-08-15 14:50:05 +0200 |
commit | 241e1ab4b4ab12fcce75e098bab94aefd57ac216 (patch) | |
tree | d92c5c31d00c7f568ffdd4ec4eb1662954067e62 /static/main.js | |
parent | d564b1e8f9e9155169d84b85d5ca6464515f1552 (diff) | |
download | influxdb-guard-241e1ab4b4ab12fcce75e098bab94aefd57ac216.tar.gz influxdb-guard-241e1ab4b4ab12fcce75e098bab94aefd57ac216.zip |
Refactored js arrow function
Diffstat (limited to 'static/main.js')
-rw-r--r-- | static/main.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/static/main.js b/static/main.js index d03c1b9..bad1d00 100644 --- a/static/main.js +++ b/static/main.js @@ -2,10 +2,10 @@ // TOKEN_LENGTH is provided by a inline script const ALPHABET_BASE58 = '123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ'; -function genToken() { +const genToken = () => { const rand_buffer = Array.from(window.crypto.getRandomValues(new Uint32Array(TOKEN_LENGTH))); const rand_chars = rand_buffer.map(elem => ALPHABET_BASE58.charAt(Math.round(elem/4294967295*58))); const token = rand_chars.join(""); document.getElementById("tokenField").value = token; -} +}; |