UNPKG

684 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.serialize = exports.deserialize = exports.registerSerializer = void 0;
4const serializers_1 = require("./serializers");
5let registeredSerializer = serializers_1.DefaultSerializer;
6function registerSerializer(serializer) {
7 registeredSerializer = serializers_1.extendSerializer(registeredSerializer, serializer);
8}
9exports.registerSerializer = registerSerializer;
10function deserialize(message) {
11 return registeredSerializer.deserialize(message);
12}
13exports.deserialize = deserialize;
14function serialize(input) {
15 return registeredSerializer.serialize(input);
16}
17exports.serialize = serialize;