@ifunc/flip
flip first two arguments of a function
import flip from '@ifunc/flip';
flip(Array)('a', 'b') // ['b', 'a'];
flip(Math.pow)(2, 10) // 100
flip(console.log)(1, 2, 3) // 2, 1, 3
flip first two arguments of a function
import flip from '@ifunc/flip';
flip(Array)('a', 'b') // ['b', 'a'];
flip(Math.pow)(2, 10) // 100
flip(console.log)(1, 2, 3) // 2, 1, 3
npm i @ifunc/flip
2
1.0.0
MIT
979 B
3