Tabnine Logo For Javascript
LoDashStatic.isPlainObject
Code IndexAdd Tabnine to your IDE (free)

How to use
isPlainObject
function
in
LoDashStatic

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

origin: lando/lando

/*
 * Helper to get the applications environment variables
 */
const getPlatformVariables = app => {
 const strippedVars = _.omit(_.get(app, 'variables', {}), ['env']);

 // Loop through and try to build things out
 const vars = {};
 _.forEach(strippedVars, (value, key) => {
  if (_.isPlainObject(value)) {
   // @NOTE sorry to my CS teacher for these names
   _.forEach(value, (value2, key2) => {
    vars[`${key}:${key2}`] = value2;
   });
  } else {
   vars[key] = value;
  }
 });

 // Merge in needed local overrides and encode
 return encode(_.merge({}, vars, overrides));
}
origin: masumsoft/express-cassandra

is_field_default_value_valid(modelSchema, fieldName) {
  if (_.isPlainObject(modelSchema.fields[fieldName]) && modelSchema.fields[fieldName].default) {
   if (_.isPlainObject(modelSchema.fields[fieldName].default)
     && !(modelSchema.fields[fieldName].default.$db_function)) {
    return ['map', 'list', 'set', 'frozen'].includes(modelSchema.fields[fieldName].type);
   }
   return true;
  }
  return true;
 }
origin: masumsoft/express-cassandra

var buildQueryRelations = function buildQueryRelations(fieldNameLocal, relationValueLocal) {
  var dbVal = parser.get_db_value_expression(schema, fieldNameLocal, relationValueLocal);
  if (_.isPlainObject(dbVal) && dbVal.query_segment) {
   queryRelations.push(util.format(whereTemplate, fieldNameLocal, operator, dbVal.query_segment));
   queryParams.push(dbVal.parameter);
  } else {
   queryRelations.push(util.format(whereTemplate, fieldNameLocal, operator, dbVal));
  }
 }
origin: masumsoft/express-cassandra

fieldValue.map(function (v) {
   var dbVal = parser.get_db_value_expression(schema, fieldName, v);

   if (_.isPlainObject(dbVal) && dbVal.query_segment) return dbVal.parameter;
   return dbVal;
  })
origin: cmake-js/fastcall

_makeType(factoryType, body, ...args) {
    if (_.isPlainObject(body)) {
      body = this.parser._resolveStringTypes(body);
    }
    else if (_.isString(body)) {
      body = this.parser._resolveStringType(body);
    }
    return { type: new factoryType(body, ...args), body };
  }
origin: masumsoft/express-cassandra

get_field_type(modelSchema, fieldName) {
  const fieldObject = modelSchema.fields[fieldName];

  if (typeof fieldObject === 'string') {
   return fieldObject;
  }
  if (_.isPlainObject(fieldObject)) {
   return fieldObject.type;
  }
  throw (new Error(`Type of field "${fieldName}" not defined properly`));
 }
origin: cmake-js/fastcall

parse(def) {
    if (_.isPlainObject(def)) {
      return this._parseObject(def);
    }
    if (_.isString(def)) {
      return this._parseString(def);
    }
    assert(false, 'Argument is not a function definition.');
  }
origin: fogine/couchbase-odm

hooks.filter(function(value) {
    if (_.isPlainObject(value) && value.name === name) {
      return false;
    }
    return true;
  })
origin: planetarydev/json-sql-builder2

build(query) {
    if (!_.isPlainObject(query)) {
      throw new Error(`Query must always be an Object.`);
    }

    this._initBuilder();

    return {
      sql: this._queryUnknown(query, null, '; '),
      values: this.currentValues()
    }
  }
origin: norfish/bigape

var configOrPlugins = function(opts) {
 if (!_.isPlainObject(opts)) {
  return;
 }

 _.forIn(opts, function(value, key) {
  if (key === 'plugins') {
   plugins(value);
  } else {
   config(key, value);
  }
 });
}
origin: Neosperience/starter-serverless-nodejs

function addDependencyOnDeployment (state, deploymentName) {
  var findBasePathMapping = function (child) {
    return _.isPlainObject(child) && child.Type === 'AWS::ApiGateway::BasePathMapping';
  };
  var basePathMapping = pickFromTree(state, findBasePathMapping)[0];
  basePathMapping.DependsOn = [deploymentName];
}
origin: masumsoft/express-cassandra

is_field_default_value_valid(modelSchema, fieldName) {
  if (_.isPlainObject(modelSchema.fields[fieldName]) && modelSchema.fields[fieldName].default) {
   if (_.isPlainObject(modelSchema.fields[fieldName].default) && !modelSchema.fields[fieldName].default.$db_function) {
    return ['map', 'list', 'set', 'frozen'].includes(modelSchema.fields[fieldName].type);
   }
   return true;
  }
  return true;
 }
origin: Neosperience/starter-serverless-nodejs

function getDeploymentName (state) {
  var findDeployment = function (child) {
    return _.isPlainObject(child) && child.Type === ('AWS::ApiGateway::Deployment');
  };
  var getName = function (child, key) {
    return key;
  };
  return pickFromTree(state, findDeployment, getName)[0];
}
origin: cmake-js/fastcall

parse(def, typeHint) {
    if (_.isPlainObject(def)) {
      return this._parseObject(def, typeHint);
    }
    if (_.isString(def)) {
      return this._parseString(def, typeHint);
    }
    assert(false, 'Argument is not a ref type definition.');
  }
origin: masumsoft/express-cassandra

get_field_type(modelSchema, fieldName) {
  var fieldObject = modelSchema.fields[fieldName];

  if (typeof fieldObject === 'string') {
   return fieldObject;
  }
  if (_.isPlainObject(fieldObject)) {
   return fieldObject.type;
  }
  throw new Error(`Type of field "${fieldName}" not defined properly`);
 }
lodash(npm)LoDashStaticisPlainObject

JSDoc

Checks if value is a plain object, that is, an object created by the Object constructor or one with a
[[Prototype]] of null.
Note: This method assumes objects created by the Object constructor have no inherited enumerable properties.

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

  • js-yaml
    YAML 1.2 parser and serializer
  • crypto
  • qs
    A querystring parser that supports nesting and arrays, with a depth limit
  • through2
    A tiny wrapper around Node.js streams.Transform (Streams2/3) to avoid explicit subclassing noise
  • path
  • glob
    a little globber
  • commander
    the complete solution for node.js command-line programs
  • axios
    Promise based HTTP client for the browser and node.js
  • redis
    Redis client library
  • 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