Validation API

hasTrue()

Validates that the passed arguments are neither undefined, null, false, NaN, 0, ''.

  • Accepts any arguments.
  • Returns true if all provided arguments pass the validation, otherwise, returns false.
Example:
hasTrue(1);
// true

hasTrue('book', [], {}, $('body'));
// true

isTrue(function example() {});
// true

hasTrue(0);
// false

hasTrue('');
// false

hasTrue(null);
// false

hasTrue(1, 'book', undefined);
// false