mirror of
https://github.com/openpgpjs/openpgpjs.git
synced 2026-02-26 21:13:20 +00:00
15 lines
320 B
JavaScript
15 lines
320 B
JavaScript
import BigInteger from './native.interface';
|
|
|
|
const detectBigInt = () => typeof BigInt !== 'undefined';
|
|
|
|
async function getBigInteger() {
|
|
if (detectBigInt()) {
|
|
return BigInteger;
|
|
} else {
|
|
const { default: BigInteger } = await import('./bn.interface');
|
|
return BigInteger;
|
|
}
|
|
}
|
|
|
|
export { getBigInteger };
|