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.

30 lines
413 B

4 years ago
  1. # Usage
  2. ### JavaScript
  3. ```js
  4. // Using require
  5. const collect = require('collect.js');
  6. collect(products)
  7. .where('price', '>', 299)
  8. .sortBy('brand');
  9. ```
  10. ```js
  11. // Using import
  12. import collect from 'collect.js';
  13. collect(products)
  14. .where('price', '>', 299)
  15. .sortBy('brand');
  16. ```
  17. ### TypeScript
  18. ```ts
  19. import collect from 'collect.js';
  20. collect(products)
  21. .where('price', '>', 299)
  22. .sortBy('brand');
  23. ```