@lucidcms/core
Version:
The core of the Lucid CMS. It's responsible for spinning up the API and serving the CMS.
1 lines • 594 B
Source Map (JSON)
{"version":3,"file":"get-table-key-value.mjs","names":[],"sources":["../../../../../src/libs/db/query-builder/utils/get-table-key-value.ts"],"sourcesContent":["import type { ReferenceExpression } from \"kysely\";\n\nconst getTableKeyValue = <DB, Table extends keyof DB>(\n\tkey: string,\n\tkeyMap?: Record<string, ReferenceExpression<DB, Table>>,\n): ReferenceExpression<DB, Table> | undefined => {\n\tif (keyMap?.[key]) {\n\t\treturn keyMap[key];\n\t}\n\treturn undefined;\n};\n\nexport default getTableKeyValue;\n"],"mappings":"AAEA,MAAM,GACL,EACA,IACgD,CAChD,GAAI,IAAS,GACZ,OAAO,EAAO,EAGhB"}