How to use the 3vl.Vector3vl.fromHex function in 3vl

To help you get started, we’ve selected a few 3vl examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tilk / digitaljs / src / help.js View on Github external
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);
    }
}