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.

17 lines
405 B

4 years ago
  1. # `combine()`
  2. The combine method combines the keys of the collection with the values of another array or collection:
  3. ```js
  4. const collection = collect(['name', 'number']);
  5. const combine = collection.combine(['Steven Gerrard', 8]);
  6. combine.all();
  7. // {
  8. // name: 'Steven Gerrard',
  9. // number: 8
  10. // }
  11. ```
  12. [View source on GitHub](https://github.com/ecrmnn/collect.js/blob/master/src/methods/combine.js)