mirror of
https://github.com/morluto/rea.git
synced 2026-11-19 13:12:26 +00:00
15 lines
481 B
TypeScript
15 lines
481 B
TypeScript
import { compositeKey } from "../unicodeCodePointOrder.js";
|
|
|
|
/** Key an entity by its type, collection, and caller-supplied identifier. */
|
|
export const environmentEntityKey = (
|
|
type: string,
|
|
collection: string,
|
|
id: string,
|
|
): string => compositeKey([type, collection, id]);
|
|
|
|
/** Key a collection by its type and caller-supplied collection path. */
|
|
export const environmentCollectionKey = (
|
|
type: string,
|
|
collection: string,
|
|
): string => compositeKey([type, collection]);
|