How to use is-boolean-object - 1 common examples

To help you get started, we’ve selected a few is-boolean-object examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github airbnb / enzyme / packages / enzyme / src / Debug.js View on Github external
function propString(prop, options) {
  if (isString(prop)) {
    return inspect(String(prop), { quoteStyle: 'double' });
  }
  if (isNumber(prop)) {
    return `{${inspect(Number(prop))}}`;
  }
  if (isBoolean(prop)) {
    return `{${inspect(booleanValue(prop))}}`;
  }
  if (isCallable(prop)) {
    return `{${inspect(prop)}}`;
  }
  if (typeof prop === 'object') {
    if (options.verbose) {
      return `{${inspect(prop)}}`;
    }

    return '{{...}}';
  }
  return `{[${typeof prop}]}`;
}

is-boolean-object

Is this value a JS Boolean? This module works cross-realm/iframe, and despite ES6 @@toStringTag.

MIT
Latest version published 3 years ago

Package Health Score

67 / 100
Full package analysis

Popular is-boolean-object functions