diff --git a/.gitignore b/.gitignore index 3c3629e..d5f19d8 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ node_modules +package-lock.json diff --git a/memory.js b/memory.js index d4e16c2..34ec562 100644 --- a/memory.js +++ b/memory.js @@ -17,7 +17,7 @@ var sink function loadSink () { if (sink) return sink - var MessageChannel = global.MessageChannel + var MessageChannel = globalThis.MessageChannel if (MessageChannel == null) ({ MessageChannel } = require('worker' + '_threads')) sink = new MessageChannel() return sink diff --git a/package.json b/package.json index a760f99..1f15bd5 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "devDependencies": { "browserify": "^16.5.1", "sodium-test": "^0.10.0", - "standard": "^14.3.4", + "standard": "^15.0.1", "tape-run": "^7.0.0" }, "standard": { diff --git a/randombytes.js b/randombytes.js index f0060c0..5d6f442 100644 --- a/randombytes.js +++ b/randombytes.js @@ -2,7 +2,7 @@ var assert = require('nanoassert') var randombytes = (function () { var QUOTA = 65536 // limit for QuotaExceededException - var crypto = global.crypto || global.msCrypto + var crypto = globalThis.crypto || globalThis.msCrypto function browserBytes (out, n) { for (let i = 0; i < n; i += QUOTA) {