UNPKG

@berish/rfp

Version:

Binary secure transport organization protocol for peer communication using function fingerprints

19 lines 531 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.jsonStringEncoder = void 0; exports.jsonStringEncoder = { encode: (data) => { const json = data && data.toJSON(); return json && JSON.stringify(json.data); }, decode: (binary) => { try { const json = binary && JSON.parse(binary); return json && Buffer.from(json); } catch (err) { return null; } }, }; //# sourceMappingURL=jsonStringEncoder.js.map