@4players/odin-common
Version:
A collection of commonly used type definitions and utility functions across ODIN web projects
12 lines (11 loc) • 401 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.msgpackEncode = msgpackEncode;
exports.msgpackDecode = msgpackDecode;
const msgpack_1 = require("@msgpack/msgpack");
function msgpackEncode(value) {
return (0, msgpack_1.encode)(value, { forceFloat32: true, ignoreUndefined: true });
}
function msgpackDecode(buffer) {
return (0, msgpack_1.decode)(buffer);
}