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 encodeMutability(v) {
var byte = constants.globalTypesByString[v];
if (typeof byte === "undefined") {
throw new Error("Unknown mutability: " + v);
}
return parseInt(byte, 10);
}
export function encodeUTF8Vec(str) {
export function encodeMutability(v) {
var byte = constants.globalTypesByString[v];
if (typeof byte === "undefined") {
throw new Error("Unknown mutability: " + v);
}
return parseInt(byte, 10);
}
export function encodeUTF8Vec(str) {
export function encodeMutability(v: Mutability): Byte {
const byte = constants.globalTypesByString[v];
if (typeof byte === "undefined") {
throw new Error("Unknown mutability: " + v);
}
return parseInt(byte, 10);
}