mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
setting nodes on flow\
This commit is contained in:
parent
4a7fe884f9
commit
4c49ed000a
4 changed files with 16 additions and 9 deletions
|
@ -4,3 +4,5 @@ import nth from 'ramda/es/nth';
|
|||
import remove from 'ramda/es/remove';
|
||||
|
||||
export const moveArrItem = curry((at, to, list) => insert(to, nth(at, list), remove(at, 1, list)));
|
||||
export const objFromArray = (array: any[], key: string) =>
|
||||
array.reduce((obj, el) => (key && el[key] ? { ...obj, [el[key]]: el } : obj), {});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue