serialize.esm.js
function __serializeArray(data, options=DEFAULT_OPTIONS) {
	let dataBuffers = [];
	// ignore undefined value
	for (let key in data) {
		let subData = data[key];
		let subType = __getType(subData, options);
		let subTypeBuffer = __serializeType(subType);
		let subDataBuffers = __serializeData(subType, subData, options);
		dataBuffers.push(subTypeBuffer, ...subDataBuffers);
	}
	let length = __getLengthByArrayBuffers(dataBuffers);
	let lengthData = new Uint32Array([length]);
	return [lengthData.buffer, ...dataBuffers];
}
function __serializeArray(data, options=DEFAULT_OPTIONS) {
	let dataBuffers = [];
	// ignore undefined value
	for (let key in data) {
		let subData = data[key];
		let subType = __getType(subData, options);
		let subTypeBuffer = __serializeType(subType);
		let subDataBuffers = __serializeData(subType, subData, options);
		dataBuffers.push(subTypeBuffer, ...subDataBuffers);
	}
	let length = __getLengthByArrayBuffers(dataBuffers);
	let lengthData = new Uint32Array([length]);
	return [lengthData.buffer, ...dataBuffers];
}
function __serializeArray ( data , options = DEFAULT_OPTIONS ) { let dataBuffers = [ ] ; // ignore undefined value for ( let key in data ) { let subData = data [ key ] ; let subType = __getType ( subData , options ) ; let subTypeBuffer = __serializeType ( subType ) ; let subDataBuffers = __serializeData ( subType , subData , options ) ; dataBuffers . push ( subTypeBuffer , ... subDataBuffers ) ; } let length = __getLengthByArrayBuffers ( dataBuffers ) ; let lengthData = new Uint32Array ( [ length ] ) ; return [ lengthData . buffer , ... dataBuffers ] ; }
Serialize array data
@param {*[]} data
@param {Object} options
@param {boolean} options.sort_key
@param {boolean} options.streaming_array
@param {boolean} options.streaming_object
@returns {ArrayBuffer[]}
@private
Serialize array data