UNPKG

524 BJavaScriptView Raw
1import _includes from "lodash/fp/includes";
2import _concat from "lodash/fp/concat";
3export default function requestedClues(config) {
4 return (array = [], action) => {
5 switch (action.type) {
6 case 'clue':
7 {
8 const requestedClueAction = action;
9 const slideRef = requestedClueAction.payload.content.ref;
10 return _includes(slideRef, array) ? array : _concat(array, [slideRef]);
11 }
12
13 default:
14 return array;
15 }
16 };
17}
18//# sourceMappingURL=requested-clues.js.map
\No newline at end of file