How to use the is-lite.plainObject function in is-lite

To help you get started, we’ve selected a few is-lite 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 gilbarbara / react-joyride / src / modules / step.js View on Github external
export function validateStep(step: StepProps, debug: boolean = false): boolean {
  if (!is.plainObject(step)) {
    log({
      title: 'validateStep',
      data: 'step must be an object',
      warn: true,
      debug,
    });
    return false;
  }

  if (!step.target) {
    log({
      title: 'validateStep',
      data: 'target is missing from the step',
      warn: true,
      debug,
    });
github gilbarbara / react-joyride / src / modules / helpers.js View on Github external
data.forEach(d => {
          if (is.plainObject(d) && d.key) {
            logFn.apply(console, [d.key, d.value]);
          } else {
            logFn.apply(console, [d]);
          }
        });
      } else {

is-lite

A tiny javascript type testing tool

MIT
Latest version published 5 months ago

Package Health Score

69 / 100
Full package analysis