Represents a key-value pair with a unique identifier.

This class is used to create structured key-value objects with an automatically generated unique ID. The value is optional and can be left undefined.

const item = new KeyValue('username', 'johndoe');
console.log(item.toString());

const emptyItem = new KeyValue('description');
console.log(item.toString());

Hierarchy (View Summary)

Constructors

Properties

Methods

Constructors

Properties

id: string
key: string
value?: string

Methods