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.

18 lines
374 B

4 years ago
  1. # `isNotEmpty()`
  2. The isNotEmpty method returns true if the collection is not empty; otherwise, false is returned:
  3. ```js
  4. collect([1, 2, 3]).isNotEmpty();
  5. // true
  6. collect().isNotEmpty();
  7. // false
  8. collect([]).isNotEmpty();
  9. // false
  10. collect({}).isNotEmpty();
  11. // false
  12. ```
  13. [View source on GitHub](https://github.com/ecrmnn/collect.js/blob/master/src/methods/isNotEmpty.js)