@translated/lara
Version:
Official Lara SDK for JavaScript and Node.js
16 lines (15 loc) • 483 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = instance;
const browser_crypto_1 = require("./browser-crypto");
const node_crypto_1 = require("./node-crypto");
let _instance;
function instance() {
if (_instance === undefined) {
if (typeof window !== "undefined")
_instance = new browser_crypto_1.BrowserCrypto();
else
_instance = new node_crypto_1.NodeCrypto();
}
return _instance;
}