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.

23 lines
375 B

4 years ago
  1. # `all()`
  2. The all method returns the underlying array or object represented by the collection:
  3. ```js
  4. collect([1, 2, 3]).all();
  5. // [1, 2, 3]
  6. ```
  7. ```js
  8. collect({
  9. firstname: 'Sadio',
  10. lastname: 'Mané',
  11. }).all();
  12. // {
  13. // firstname: 'Sadio',
  14. // lastname: 'Mané',
  15. // }
  16. ```
  17. [View source on GitHub](https://github.com/ecrmnn/collect.js/blob/master/src/methods/all.js)