Skip to content

Function: toTaggedFeatures()

@kortexya/reasoninglayer


@kortexya/reasoninglayer / toTaggedFeatures

Function: toTaggedFeatures()

toTaggedFeatures(features): Record<string, ValueDto>

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

Convert a plain feature map to tagged ValueDto feature map.

Parameters

features

PlainFeatureMap

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

Returns

Record<string, ValueDto>

Tagged feature map suitable for CreateTermRequest, UpdateTermRequest, etc.

Throws

If any value cannot be converted to tagged format.

Example

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