MCPcopy Create free account
hub / github.com/apache/fory / normalizeForyRoundTripValue

Function normalizeForyRoundTripValue

benchmarks/javascript/benchmark.js:792–810  ·  view source on GitHub ↗
(datasetKey, value)

Source from the content-addressed store, hash-verified

790}
791
792function normalizeForyRoundTripValue(datasetKey, value) {
793 switch (datasetKey) {
794 case "sample":
795 return {
796 ...value,
797 boolean_array: value.boolean_array instanceof BoolArray
798 ? Array.from(value.boolean_array)
799 : value.boolean_array,
800 };
801 case "samplelist":
802 return {
803 sample_list: value.sample_list.map((item) =>
804 normalizeForyRoundTripValue("sample", item)
805 ),
806 };
807 default:
808 return value;
809 }
810}
811
812function normalizeProtobufValue(datasetKey, value) {
813 switch (datasetKey) {

Callers 1

ensureSerializationWorksFunction · 0.85

Calls 2

fromMethod · 0.45
mapMethod · 0.45

Tested by

no test coverage detected