www/indexeddbshim.min.js
function(key) {
                var sign = +key.substr(2, 1);
                var exponent = key.substr(3, 2);
                var mantissa = key.substr(5, 11);

                switch (signValues[sign]) {
                    case "negativeInfinity":
                        return -Infinity;
                    case "positiveInfinity":
                        return Infinity;
                    case "bigPositive":
                        return pow32(mantissa, exponent);
                    case "smallPositive":
                        exponent = negate(flipBase32(exponent));
                        return pow32(mantissa, exponent);
                    case "smallNegative":
                        exponent = negate(exponent);
                        mantissa = flipBase32(mantissa);
                        return -pow32(mantissa, exponent);
                    case "bigNegative":
                        exponent = flipBase32(exponent);
                        mantissa = flipBase32(mantissa);
                        return -pow32(mantissa, exponent);
                    default:
                        throw new Error("Invalid number.");
                }
            }
function(key) {
                var sign = +key.substr(2, 1);
                var exponent = key.substr(3, 2);
                var mantissa = key.substr(5, 11);

                switch (signValues[sign]) {
                    case "negativeInfinity":
                        return -Infinity;
                    case "positiveInfinity":
                        return Infinity;
                    case "bigPositive":
                        return pow32(mantissa, exponent);
                    case "smallPositive":
                        exponent = negate(flipBase32(exponent));
                        return pow32(mantissa, exponent);
                    case "smallNegative":
                        exponent = negate(exponent);
                        mantissa = flipBase32(mantissa);
                        return -pow32(mantissa, exponent);
                    case "bigNegative":
                        exponent = flipBase32(exponent);
                        mantissa = flipBase32(mantissa);
                        return -pow32(mantissa, exponent);
                    default:
                        throw new Error("Invalid number.");
                }
            }
function ( key ) { var sign = + key . substr ( 2 , 1 ) ; var exponent = key . substr ( 3 , 2 ) ; var mantissa = key . substr ( 5 , 11 ) ; switch ( signValues [ sign ] ) { case "negativeInfinity" : return - Infinity ; case "positiveInfinity" : return Infinity ; case "bigPositive" : return pow32 ( mantissa , exponent ) ; case "smallPositive" : exponent = negate ( flipBase32 ( exponent ) ) ; return pow32 ( mantissa , exponent ) ; case "smallNegative" : exponent = negate ( exponent ) ; mantissa = flipBase32 ( mantissa ) ; return - pow32 ( mantissa , exponent ) ; case "bigNegative" : exponent = flipBase32 ( exponent ) ; mantissa = flipBase32 ( mantissa ) ; return - pow32 ( mantissa , exponent ) ; default : throw new Error ( "Invalid number." ) ; } }
The decode step must interpret the sign, reflip values encoded as the 32's complements, apply signs to the exponent and mantissa, do the base-32 power operation, and return the original JavaScript number values.
The decode step must interpret the sign reflip values encoded as the 32 s complements apply signs to the exponent and mantissa do the base - 32 power operation and return the original JavaScript number values .