Files
Speedtest-Tracker/conf/site/node_modules/collect.js/docs/api/flip.md
Henry Whitaker ea5808047f Tweaked gitignore
gitignore removed all composer and npm files, so automated builds would fail
2020-04-12 21:24:03 +01:00

376 B

flip()

The flip method swaps the collection's keys with their corresponding values:

const collection = collect({
  name: 'Sadio Mané',
  number: 10,
});

const flipped = collection.flip();

flipped.all();

// {
//   'Sadio Mané': 'name',
//   '10': 'number',
// }

View source on GitHub