chore: update to version 14.0.11 and align website URLs

This commit is contained in:
2026-01-11 11:34:13 +03:00
parent ef74383349
commit 19c8d69bd8
1499 changed files with 53633 additions and 89 deletions
+25
View File
@@ -0,0 +1,25 @@
import { BigInt } from '@pezkuwi/x-bigint';
import { hexToBigInt } from '../hex/toBigInt.js';
import { isBn } from '../is/bn.js';
import { isHex } from '../is/hex.js';
import { isToBigInt } from '../is/toBigInt.js';
import { isToBn } from '../is/toBn.js';
/**
* @name nToBigInt
* @summary Creates a bigInt value from a BN, bigint, string (base 10 or hex) or number input.
*/
export function nToBigInt(value) {
return typeof value === 'bigint'
? value
: !value
? BigInt(0)
: isHex(value)
? hexToBigInt(value.toString())
: isBn(value)
? BigInt(value.toString())
: isToBigInt(value)
? value.toBigInt()
: isToBn(value)
? BigInt(value.toBn().toString())
: BigInt(value);
}