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
596 B

4 years ago
  1. # `whereNotBetween()`
  2. The whereNotBetween method filters the collection within a given range:
  3. ```js
  4. const collection = collect([
  5. { product: 'Desk', price: 200 },
  6. { product: 'Chair', price: 80 },
  7. { product: 'Bookcase', price: 150 },
  8. { product: 'Pencil', price: 30 },
  9. { product: 'Door', price: 100 },
  10. ]);
  11. const filtered = collection.whereNotBetween('price', [100, 200]);
  12. filtered.all();
  13. // [
  14. // { product: 'Chair', price: 80 },
  15. // { product: 'Pencil', price: 30 },
  16. // ]
  17. ```
  18. [View source on GitHub](https://github.com/ecrmnn/collect.js/blob/master/src/methods/whereNotBetween.js)