braid-http 1.3.62 → 1.3.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/braid-http-client.js +4 -4
- package/package.json +1 -1
package/braid-http-client.js
CHANGED
|
@@ -882,11 +882,11 @@ async function promise_done(promise) {
|
|
|
882
882
|
}
|
|
883
883
|
|
|
884
884
|
function random_base64url(n) {
|
|
885
|
-
var buf = new Uint8Array(n)
|
|
886
|
-
var crypt = (typeof crypto !== 'undefined') ? crypto : require('crypto')
|
|
887
885
|
var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_'
|
|
888
|
-
|
|
889
|
-
|
|
886
|
+
var result = ''
|
|
887
|
+
for (let i = 0; i < n; i++)
|
|
888
|
+
result += chars[Math.floor(Math.random() * 64)]
|
|
889
|
+
return result
|
|
890
890
|
}
|
|
891
891
|
|
|
892
892
|
|