Tabnine Logo For Javascript
isObject
Code IndexAdd Tabnine to your IDE (free)

How to use
isObject
function
in
lodash

Best JavaScript code snippets using lodash.isObject(Showing top 15 results out of 315)

origin: moleculerjs/moleculer

/**
   * Creates an instance of MqttTransporter.
   *
   * @param {any} opts
   *
   * @memberof MqttTransporter
   */
  constructor(opts) {
    super(opts);

    this.qos = 0;
    this.topicSeparator = ".";

    if (isObject(this.opts)) {
      if (this.opts.qos !== undefined) {
        this.qos = this.opts.qos;
        delete this.opts.qos;
      }
      if (this.opts.topicSeparator !== undefined) {
        this.topicSeparator = this.opts.topicSeparator;
        delete this.opts.topicSeparator;
      }
    }

    this.client = null;
  }
origin: mariobermudezjr/ecommerce-react-graphql-stripe

map(this.state.errors, (error, key) => {
     const displayError = isObject(error) && error.id ?
      <FormattedMessage {...error} /> : error;
     return (
      <div key={key} className="form-control-feedback invalid-feedback" style={{marginBottom: '1.8rem', fontSize: '1.3rem' }}>{displayError}</div>
     );
    })
origin: TryGhost/Ghost-CLI

function getDefault(prompt = {}) {
  if (prompt.choices && prompt.choices.length) {
    const defaultChoice = prompt.choices[prompt.default];
    return isObject(defaultChoice) ? defaultChoice.value : defaultChoice;
  }

  return prompt.default;
}
origin: hobochild/js-fire

const fire = argv => input => {
 if (isFunction(input)) {
  return handleFunction(argv)(input)
 }

 if (isObject(input)) {
  const cleansed = fclone(input)

  return handleObject(argv)(cleansed)
 }

 throw new InvariantViolationError()
}
origin: Radrw/strapi-pro

pullAll(Object.keys(this.config.currentEnvironment), middlewareCategories).reduce((acc, index) => {
   const current = this.config.currentEnvironment[index];

   if (isObject(current)) {
    acc = merge(acc, {
     [index]: current
    });
   } else {
    acc[index] = current;
   }

   return acc;
  }, {})
origin: erickjth/simple-command-bus

extractName(command) {
    if (isObject(command) === false ||
      isString(command.constructor.name) === false
    ) {
      throw new InvalidCommandException('Invalid Command Name.');
    }

    return command.constructor.name;
  }
origin: Radrw/strapi-pro

Object.keys(this.middleware).reduce((acc, current) => {
   // Try to find the settings in the current environment, then in the main configurations.
   const currentSettings = merge(get(cloneDeep(this.middleware[current]), ['defaults', current], {}), flattenMiddlewaresConfig[current] || this.config.currentEnvironment[current] || this.config[current]);
   acc[current] = !isObject(currentSettings) ? {} : currentSettings;

   if (!acc[current].hasOwnProperty('enabled')) {
    this.log.warn(`(middleware:${current}) wasn't loaded due to missing key \`enabled\` in the configuration`);
   }

   // Ensure that enabled key exist by forcing to false.
   defaults(acc[current], { enabled : false });

   return acc;
  }, {})
origin: manaflair/mylittledom

export function serializePropertyValue(value) {

  if (isArray(value))
    return value.map(sub => serializePropertyValue(sub));

  if (isObject(value) && Reflect.has(value, `serialize`))
    return value.serialize();

  return value;

}
origin: sudo-suhas/elastic-builder

/**
   * Check the instance for object representation of Geo Point.
   * If representation is null, new object is initialised.
   * If it is not null, warning is logged and point is overwritten.
   * @private
   */
  _checkObjRepr() {
    if (isNil(this._point)) this._point = {};
    else if (!isObject(this._point)) {
      this._warnMixedRepr();
      this._point = {};
    }
  }
origin: sudo-suhas/elastic-builder

/**
   * Check that the object property `this._suggestOpts.fuzzy` is an object.
   * Set empty object if required.
   *
   * @private
   */
  _checkFuzzy() {
    if (!isObject(this._suggestOpts.fuzzy)) {
      this._suggestOpts.fuzzy = {};
    }
  }
origin: sunny-sanath/the-example-app.nodejs

Object.keys(entry.fields).map((key) => {
  const field = entry.fields[key]
  if (isObject(field)) {
   return [entry.fields[key], publishedEntry.fields[key]]
  }
 }).filter(Boolean)
origin: erickjth/simple-command-bus

constructor(handlers = {}) {
    super();
    this.handlers = {};
    if (isObject(handlers)) {
      this.handlers = reduce(handlers, (carry, Handler, key) => {
        carry[key] = isFunction(Handler) ? new Handler() : Handler; // eslint-disable-line
        return carry;
      }, {});
    }
  }
origin: TryGhost/Ghost-CLI

write(data, enc, cb) {
    // Bunyan sometimes passes things as objects. Because of this, we need to make sure
    // the data is converted to JSON
    if (isObject(data) && !(data instanceof Buffer)) {
      data = JSON.stringify(data);
    }

    super.write(data, enc, cb);
  }
origin: mariobermudezjr/ecommerce-react-graphql-stripe

map(this.state.errors, (error, key) => {
     const displayError = isObject(error) && error.id
      ? <FormattedMessage id={error} />
      : error;
     return (
      <div key={key} className="form-control-feedback invalid-feedback" style={{ fontSize: '1.3rem' }}>{displayError}</div>
     );
    })
origin: mariobermudezjr/ecommerce-react-graphql-stripe

map(this.state.errors, (error, key) => {
     const displayError = isObject(error) && error.id
      ? <FormattedMessage {...error} />
      : error;
     return (
      <div key={key} className="form-control-feedback invalid-feedback" style={{marginBottom: '1.8rem', fontSize: '1.3rem' }}>{displayError}</div>
     );
    })
lodash(npm)isObject

Most used lodash functions

  • LoDashStatic.map
    Creates an array of values by running each element in collection through iteratee. The iteratee is
  • LoDashStatic.isEmpty
    Checks if value is empty. A value is considered empty unless it’s an arguments object, array, string
  • LoDashStatic.forEach
    Iterates over elements of collection invoking iteratee for each element. The iteratee is invoked wit
  • LoDashStatic.find
    Iterates over elements of collection, returning the first element predicate returns truthy for.
  • LoDashStatic.pick
    Creates an object composed of the picked `object` properties.
  • LoDashStatic.get,
  • LoDashStatic.isArray,
  • LoDashStatic.filter,
  • LoDashStatic.merge,
  • LoDashStatic.isString,
  • LoDashStatic.isFunction,
  • LoDashStatic.assign,
  • LoDashStatic.extend,
  • LoDashStatic.includes,
  • LoDashStatic.keys,
  • LoDashStatic.cloneDeep,
  • LoDashStatic.uniq,
  • LoDashStatic.isObject,
  • LoDashStatic.omit

Popular in JavaScript

  • path
  • axios
    Promise based HTTP client for the browser and node.js
  • postcss
  • ms
    Tiny millisecond conversion utility
  • moment
    Parse, validate, manipulate, and display dates
  • express
    Fast, unopinionated, minimalist web framework
  • bluebird
    Full featured Promises/A+ implementation with exceptionally good performance
  • commander
    the complete solution for node.js command-line programs
  • crypto
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJavascript Code Index
Get Tabnine for your IDE now