How to use the bool function from is

Find comprehensive JavaScript is.bool code examples handpicked from public code repositorys.

18
19
20
21
22
23
24
25
26
27
// Make sure our metadata inputs are valid, putting out a console error and aborting if not.
function areOptionsValid(options) {
  var validators = {
    isHjidValid:
      is.number(options.hjid) && !is.nan(options.hjid) && options.hjid !== 0, // Make sure that HJID is a number (and isn't NaN)
    isPlaceholderPolyfillValid: is.bool(options.hjPlaceholderPolyfill) // Make sure we received a boolean.
  };

  for (var validator in validators) {
    if (!validators[validator]) {
fork icon144
star icon0
watch icon2

+ 5 other calls in file