in src/ObjectStoreProviderUtils.ts [202:233]
export function serializeKeyToString(
key: KeyType,
keyPath: KeyPathType
): string {
if (isCompoundKeyPath(keyPath)) {
if (isArray(key)) {
return map(key, (k) => serializeValueToOrderableString(k)).join(
keypathJoinerString
);
} else {
throw new Error(
"serializeKeyToString called with a compound keypath (" +
JSON.stringify(keyPath) +
") but a non-compound key (" +
JSON.stringify(key) +
")"
);
}
} else {
if (isArray(key)) {
throw new Error(
"serializeKeyToString called with a non-compound keypath (" +
JSON.stringify(keyPath) +
") but a compound key (" +
JSON.stringify(key) +
")"
);
} else {
return serializeValueToOrderableString(key);
}
}
}