You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

412 B

sortKeys()

The sortKeys method sorts the collection by the keys of the underlying associative array:

const collection = collect({
  id: 10,
  first: 'Sadio',
  last: 'Mané',
});

const sorted = collection.sortKeys();

sorted.all();

// {
//   first: 'Sadio',
//   id: 10,
//   last: 'Mané',
// }

View source on GitHub