-
Notifications
You must be signed in to change notification settings - Fork 24
Conversation
@@ -6,14 +8,13 @@ const nodeify = require('nodeify') | |||
const webCrypto = getWebCrypto() | |||
|
|||
function getWebCrypto () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason why getWebCrypto
is defined twice in separate files? Should it be moved to some utils lib/file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah if you could do this please. I think I forgot to clean this up when the second one was introduced.
@@ -1,18 +1,19 @@ | |||
/* global self */ | |||
|
|||
'use strict' | |||
|
|||
const nodeify = require('nodeify') | |||
|
|||
const webCrypto = getWebCrypto() | |||
|
|||
function getWebCrypto () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file (crypto-sha1-2-browser.js
) adds a new method sha3
that is not present in crypto-browser.js
, other than that they are exactly the same, should we remove crypto-browser.js
?
for browserify (not sure about webpack) you can use the keyword |
Doesn't seem to be defined in webpack, can someone confirm if it supports this use case? I agree, it would be much cleaner to have the bundler handle that rather than doing it in code. |
@kumavis @dignifiedquire as an alternative, we can simply use |
Thank you closing in favor of #14 |
window
is not defined inside WebWorkers/ServiceWorkers, fallback toself
instead.