mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-13 12:38:39 -09:00
* Upgrade eslint to v6 and add TypeScript linting * Fix pr checks Co-authored-by: Benjamin Staneck <Stanzilla@users.noreply.github.com>
12 lines
316 B
JavaScript
12 lines
316 B
JavaScript
import {createSelector} from 'reselect';
|
|
|
|
const getTermGroups = ({termGroups}) => termGroups.termGroups;
|
|
const getRootGroups = createSelector(
|
|
getTermGroups,
|
|
termGroups =>
|
|
Object.keys(termGroups)
|
|
.map(uid => termGroups[uid])
|
|
.filter(({parentUid}) => !parentUid)
|
|
);
|
|
|
|
export default getRootGroups;
|