Skip to content

Function: toTaggedFeatures()

@kortexya/reasoninglayer


@kortexya/reasoninglayer / toTaggedFeatures

toTaggedFeatures(features): Record<string, ValueDto>

Defined in: src/utils/convert.ts:201

Convert a plain feature map to tagged ValueDto feature map.

PlainFeatureMap

Plain feature map or already-tagged Record<string, ValueDto>.

Record<string, ValueDto>

Tagged feature map suitable for CreateTermRequest, UpdateTermRequest, etc.

If any value cannot be converted to tagged format.

toTaggedFeatures({ name: "Alice", age: 30, active: true })
// { name: { type: "String", value: "Alice" }, age: { type: "Integer", value: 30 }, ... }