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:
parent
125a120c85
commit
cfe7603379
3 changed files with 17 additions and 5 deletions
6
src/utils/fn.ts
Normal file
6
src/utils/fn.ts
Normal 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)))
|
Loading…
Add table
Add a link
Reference in a new issue