1 | import { BigInt } from '@polkadot/x-bigint';
|
2 | import { xglobal } from '@polkadot/x-global';
|
3 |
|
4 | export const hasBigInt = typeof BigInt === 'function' && typeof BigInt.asIntN === 'function';
|
5 |
|
6 | export const hasCjs = typeof require === 'function' && typeof module !== 'undefined';
|
7 |
|
8 | export const hasDirname = typeof __dirname !== 'undefined';
|
9 |
|
10 | export const hasEsm = !hasCjs;
|
11 |
|
12 | export const hasWasm = typeof WebAssembly !== 'undefined';
|
13 |
|
14 | export const hasBuffer = typeof xglobal.Buffer === 'function' && typeof xglobal.Buffer.isBuffer === 'function';
|
15 |
|
16 | export const hasProcess = typeof xglobal.process === 'object';
|