bigbuffet-rw/app/soapbox/entity-store/hooks/utils.ts

9 lines
307 B
TypeScript
Raw Normal View History

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