UNPKG

alignai

Version:

Server-side Align AI SDK for Node.js

14 lines (13 loc) 528 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.serializeCustomProperties = void 0; const event_pb_1 = require("./buf/event_pb"); function serializeCustomProperties(props) { return Object.entries(props).reduce((acc, [key, value]) => { if (typeof value === 'string') { acc[key] = event_pb_1.EventProperties_CustomPropertyValue.fromJson({ stringValue: value }); } return acc; }, {}); } exports.serializeCustomProperties = serializeCustomProperties;