function
jsc.serialize
value: any,
options?: { binaryType: 'arraybuffer' }
Serializes a JavaScript value into a binary representation that can be sent to another Bun instance.
Internally, this uses the serialization format from WebKit/Safari.
@param value
The value to serialize, usually an object or array
@returns
A SharedArrayBuffer that can be sent to another Bun instance
value: any,
options?: { binaryType: 'nodebuffer' }
Serializes a JavaScript value into a binary representation that can be sent to another Bun instance.
Internally, this uses the serialization format from WebKit/Safari.
@param value
The value to serialize, usually an object or array
@returns
A Buffer that can be sent to another Bun instance