just-flip
TypeScript icon, indicating that this package has built-in type declarations

2.2.0 • Public • Published

just-flip

Part of a library of zero-dependency npm modules that do just do one thing. Guilt-free utilities for every occasion.

🍦 Try it

npm install just-flip
yarn add just-flip

Flip first two arguments of a function

import flip from 'just-flip';

flip(console.log)(1, 2, 3) // 2, 1, 3

import map from 'just-map-object';
import partial from 'just-partial';

const numbers = {x: 5, y: 10};
const flippedMap = flip(map);
const double = partial(flippedMap, (undefined, number) => number * 2);
double(numbers) // {x: 10, y: 20];

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.2.0
    1
    • latest

Version History

Package Sidebar

Install

npm i just-flip

Weekly Downloads

2

Version

2.2.0

License

MIT

Unpacked Size

5.44 kB

Total Files

9

Last publish

Collaborators

  • angus-c