Files
FrenoCorp/node_modules/@msgpack/msgpack/dist/encode.js
Michael Freno 7c684a42cc FRE-600: Fix code review blockers
- Consolidated duplicate UndoManagers to single instance
- Fixed connection promise to only resolve on 'connected' status
- Fixed WebSocketProvider import (WebsocketProvider)
- Added proper doc.destroy() cleanup
- Renamed isPresenceInitialized property to avoid conflict

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-25 00:08:01 -04:00

17 lines
838 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.encode = void 0;
const Encoder_1 = require("./Encoder");
const defaultEncodeOptions = {};
/**
* It encodes `value` in the MessagePack format and
* returns a byte buffer.
*
* The returned buffer is a slice of a larger `ArrayBuffer`, so you have to use its `#byteOffset` and `#byteLength` in order to convert it to another typed arrays including NodeJS `Buffer`.
*/
function encode(value, options = defaultEncodeOptions) {
const encoder = new Encoder_1.Encoder(options.extensionCodec, options.context, options.maxDepth, options.initialBufferSize, options.sortKeys, options.forceFloat32, options.ignoreUndefined, options.forceIntegerToFloat);
return encoder.encodeSharedRef(value);
}
exports.encode = encode;
//# sourceMappingURL=encode.js.map