9 lines
307 B
TypeScript
9 lines
307 B
TypeScript
import type { EntitiesPath, ExpandedEntitiesPath } from './types';
|
|
|
|
function parseEntitiesPath(expandedPath: ExpandedEntitiesPath): EntitiesPath {
|
|
const [entityType, ...listKeys] = expandedPath;
|
|
const listKey = (listKeys || []).join(':');
|
|
return [entityType, listKey];
|
|
}
|
|
|
|
export { parseEntitiesPath }; |