API reference@evolu/commonObject › createRecord

function createRecord<K, V>(): Record<K, V>;

Defined in: packages/common/src/Object.ts:184

Creates a prototype-less object typed as Record<K, V>.

Use this function when you need a plain record without a prototype chain (e.g. when keys are controlled by external sources) to avoid prototype pollution and accidental collisions with properties like __proto__.

Example:

const values = createRecord<string, SqliteValue>();
values["__proto__"] = someValue; // safe, no prototype pollution