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

How to use
keys
function
in
LoDashStatic

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

origin: lando/lando

// This is a helper to take object data and break it into rows
 add(data, {joiner = this.joiner, sort = this.sort} = {}) {
  _.forEach(sort ? _.sortBy(_.keys(data)) : _.keys(data), key => {
   // Do some special things for arrays
   if (_.isArray(data[key])) data[key] = data[key].join(joiner);
   // Do something special for objects
   if (_.isObject(data[key])) data[key] = util.inspect(data[key], {compact: true});
   // Do the normal push
   this.push([(chalk[this.keyColor](_.toUpper(key))), data[key]]);
  });
 }
origin: lando/lando

// Merge in process.env as relevant
 _.forEach(_.keys(config), key => {
  if (_.has(process.env, key)) {
   config[key] = process.env[key];
  }
 });
origin: lando/lando

describe('art', () => {
 it('should return an object', () => {
  art.should.be.an('object');
 });

 _.forEach(_.keys(art), key => {
  it(`it should run ${key} without an error and return a string`, () => {
   const result = art[key]();
   result.should.be.a('string');
  });
 });
});
origin: lando/lando

_.map(overrides.volumes, volume => {
   if (!_.includes(volume, ':')) {
    return volume;
   } else {
    const local = exports.getHostPath(volume);
    const remote = _.last(volume.split(':'));
    // @TODO: I don't think below does anything?
    const excludes = _.keys(volumes).concat(_.keys(volumes));
    const host = exports.normalizePath(local, base, excludes);
    return [host, remote].join(':');
   }
  })
origin: lando/lando

/*
 * Helper to convert a command into config object
 */
const parseCommand = (cmd, service) => ({
 command: (_.isObject(cmd)) ? cmd[_.first(_.keys(cmd))] : cmd,
 service: (_.isObject(cmd)) ? _.first(_.keys(cmd)) : service,
})
origin: lando/lando

_(composeData)
 .flatMap(data => data.data)
 .flatMap(data => _.keys(data.services))
 .uniq()
 .value()
origin: lando/lando

// Set a different default if needed
 lando.events.on('cli-ssh-run', 2, data => {
  if (data.options.service === 'appserver') {
   // Discovery
   const services = _.keys(data.options._app.services);
   const hasRecipe = _.has(data, 'options._app.recipe');

   // If this is not a recipe and we have no appserver container then set a new default
   if (!hasRecipe && !_.includes(services, 'appserver')) {
    data.options.service = _.first(services);
    data.options.s = data.options.service;
   }
  }
 });
origin: lando/lando

// Assess whether we need to upgrade the lando network or not
 lando.events.on('pre-engine-start', 2, () => {
  if (lando.versions.networking === 1) {
   lando.log.warn('Version %s Landonet detected, attempting upgrade...', lando.versions.networking);
   const landonet = lando.engine.getNetwork(lando.config.networkBridge);
   // Remove the old network
   return landonet.inspect()
   .then(data => _.keys(data.Containers))
   .each(id => landonet.disconnect({Container: id, Force: true}))
   .then(() => landonet.remove())
   .catch(err => {
    lando.log.verbose('Error inspecting lando_bridge_network, probably does not exit yet');
    lando.log.debug(err);
   });
  }
 });
origin: lando/lando

// Key find helper
const getFirstKey = obj => _.first(_.keys(obj))
origin: lando/lando

Promise.resolve(_.keys(docs.sections))
origin: FormidableLabs/nodejs-dashboard

this.aggregationLevels = _.keys(this._aggregation);
this.lowestAggregateTimeUnits = Number(this.aggregationLevels[0]);
this.highestAggregationKey = _.last(this.aggregationLevels);
origin: lando/lando

message: 'Choose relationships to push to platformsh',
choices: () => {
 return _.keys(closestApp.relationships);
},
when: () => !_.isEmpty(closestApp.relationships),
message: 'Choose mounts to push to platformsh',
choices: () => {
 return _.keys(closestApp.mounts);
},
when: () => !_.isEmpty(closestApp.mounts),
origin: lando/lando

// Merge in process.env as relevant
 _.forEach(_.keys(config), key => {
  if (_.has(process.env, key)) {
   config[key] = process.env[key];
  }
 });
origin: lando/lando

// Merge in process.env as relevant
 _.forEach(_.keys(config), key => {
  if (_.has(process.env, key)) {
   config[key] = process.env[key];
  }
 });
origin: lando/lando

// Merge in process.env as relevant
 _.forEach(_.keys(config), key => {
  if (_.has(process.env, key)) {
   config[key] = process.env[key];
  }
 });
lodash(npm)LoDashStatickeys

JSDoc

Creates an array of the own enumerable property names of object.
Note: Non-object values are coerced to objects. See the ES spec for more details.

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

  • fs-extra
    fs-extra contains methods that aren't included in the vanilla Node.js fs package. Such as mkdir -p, cp -r, and rm -rf.
  • webpack
    Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.
  • ms
    Tiny millisecond conversion utility
  • semver
    The semantic version parser used by npm.
  • glob
    a little globber
  • mocha
    simple, flexible, fun test framework
  • winston
    A logger for just about everything.
  • cheerio
    Tiny, fast, and elegant implementation of core jQuery designed specifically for the server
  • moment
    Parse, validate, manipulate, and display dates
  • Top Vim plugins
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