mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-13 12:38:39 -09:00
10 lines
284 B
JavaScript
10 lines
284 B
JavaScript
|
|
import {createSelector} from 'reselect';
|
||
|
|
|
||
|
|
const getTermGroups = ({termGroups}) => termGroups.termGroups;
|
||
|
|
export const getRootGroups = createSelector(
|
||
|
|
getTermGroups,
|
||
|
|
termGroups => Object.keys(termGroups)
|
||
|
|
.map(uid => termGroups[uid])
|
||
|
|
.filter(({parentUid}) => !parentUid)
|
||
|
|
);
|