From a9033785ae2cd48b1f1d6c3b3784f4b76ee1edd8 Mon Sep 17 00:00:00 2001 From: Greg Linklater Date: Sun, 20 May 2018 10:07:00 +0200 Subject: [PATCH 1/2] feat(browser): handle use in the browser --- browser.js | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 browser.js diff --git a/browser.js b/browser.js new file mode 100644 index 0000000..c56d4ea --- /dev/null +++ b/browser.js @@ -0,0 +1,7 @@ +'use strict' + +/** + * Export + * @ignore + */ +module.exports = window.crypto From f04fc973ecbc40873c8b39c3eb4dc3dba161e114 Mon Sep 17 00:00:00 2001 From: Greg Linklater Date: Sun, 20 May 2018 10:07:29 +0200 Subject: [PATCH 2/2] chore(npm): define browser module --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 277cf30..5c66419 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "0.9.2", "description": "WebCrypto API for Node.js", "main": "src/index.js", + "browser": "browser.js", "types": "index.d.ts", "directories": { "test": "test"