UNPKG
spacylabs-rhino2
Version:
latest (5.1.4)
5.1.4
5.1.3
5.1.2
github.com/rhinofi/client-js
spacylabs-rhino2
/
src
/
lib
/
dvf
/
generateRandomNonce.js
6 lines
(5 loc)
•
152 B
JavaScript
View Raw
1
2
3
4
5
6
// This is max nonce value accepted by sw.
const
nonceMax =
Math
.
pow
(
2
,
31
) -
1
module
.
exports
=
() =>
{
return
Math
.
ceil
(
Math
.
random
() * nonceMax) }