1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 12:56:41 +07:00

file sorting

This commit is contained in:
muerwre 2019-08-08 18:04:48 +07:00
parent 125a120c85
commit cfe7603379
3 changed files with 17 additions and 5 deletions

6
src/utils/fn.ts Normal file
View file

@ -0,0 +1,6 @@
import curry from 'ramda/es/curry';
import insert from 'ramda/es/insert';
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)))