mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-13 04:28:41 -09:00
9 lines
347 B
TypeScript
9 lines
347 B
TypeScript
import {ITermState} from '../hyper';
|
|
import {Immutable} from 'seamless-immutable';
|
|
|
|
export default function findBySession(termGroupState: Immutable<ITermState>, sessionUid: string) {
|
|
const {termGroups} = termGroupState;
|
|
return Object.keys(termGroups)
|
|
.map((uid) => termGroups[uid])
|
|
.find((group) => group.sessionUid === sessionUid);
|
|
}
|