Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function base2sig(str, bits, base) {
switch(base) {
case 'bin': return Vector3vl.fromBin(str, bits);
case 'oct': return Vector3vl.fromOct(str, bits);
case 'hex': return Vector3vl.fromHex(str, bits);
case 'dec':
if (str == 'x') return Vector3vl.xes(bits);
return bigint2sig(bigInt(str), bits);
}
}