From e51c1784a757f742fd8d6a3f6bcdccaaf711bb23 Mon Sep 17 00:00:00 2001 From: dapplion Date: Sun, 29 Nov 2020 16:59:24 +0000 Subject: [PATCH] Document lazy import --- src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/index.ts b/src/index.ts index b552a7a..0e3f1de 100644 --- a/src/index.ts +++ b/src/index.ts @@ -13,6 +13,7 @@ async function getImplementation(impl: Implementation = "herumi"): Promise return blsHerumi; case "blst-native": + // Lazy import native bindings to prevent automatically importing binding.node files if (typeof require !== "function") { throw Error("blst-native is only supported in NodeJS"); }