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

How to use
each
function
in
lodash

Best JavaScript code snippets using lodash.each(Showing top 6 results out of 315)

origin: TryGhost/Ghost-CLI

each(commands, (commandPath, commandName) => {
        // Don't fetch aliases for help commands to keep the output clean.
        bootstrap.loadCommand(commandName, commandPath, yargs, [], extensions);
      });
origin: TryGhost/Ghost-CLI

/**
   * Gets a list of the available process managers from all of the extensions
   *
   * @return {Object} hash of all process managers indexed by name
   * @method _getAvailableProcessManagers
   * @private
   */
  _getAvailableProcessManagers() {
    const available = {};

    this._extensions.forEach((ext) => {
      each(ext.processManagers, (pm, name) => {
        if (!fs.existsSync(pm)) {
          return;
        }

        available[name] = pm;
      });
    });

    return available;
  }
origin: TryGhost/Ghost-CLI

function showDetails(ui, results, error) {
  ui.log(chalk.bold.red(`\n${error ? 'Errors' : 'Warnings'}`));

  each(results, (list, fileName) => {
    /* istanbul ignore if */
    if (!list.length) {
      return;
    }

    const details = list.map((result) => {
      if (error && result.fatal) {
        return `${SPACES}- ${chalk.bold.red('Fatal error:')} ${result.rule.replace(TAGS_REGEX, '')}`;
      }

      return `${SPACES}- ${result.rule.replace(TAGS_REGEX, '')}`;
    }).join('\n');

    ui.log(`${chalk.bold.white(`${SPACES}File:`)} ${chalk.white(fileName)}\n${details}\n`);
  });
}
origin: TryGhost/Ghost-CLI

/**
   * Configure Yargs for this command. Subclasses can override this to do anything
   * specific that they need to do at config time
   *
   * @param {String} commandName Name of the command
   * @param {Yargs} yargs Yargs instance
   * @param {Array} extensions Array of discovered extensions
   * @return {Yargs} Yargs instance after options are configured
   *
   * @static
   * @method configureOptions
   * @public
   */
  static configureOptions(commandName, yargs, extensions, onlyOptions) {
    each(this.options || {}, (option, optionName) => {
      yargs = yargs.option(kebabCase(optionName), option);
    });

    if (onlyOptions) {
      return yargs;
    }

    if (this.longDescription) {
      yargs.usage(this.longDescription);
    }

    yargs.epilogue('For more information, see our docs at https://ghost.org/docs/api/ghost-cli/');

    return yargs;
  }
origin: electrode-io/xarc-run

each(this._overrides, (ov, ns) => {
 if (ns !== name && overrideMap.others.indexOf(ns) >= 0 && ov.others.indexOf(name) >= 0) {
  throw new Error(`circular namespace override between '${name}' and '${ns}'`);
each(this._overrides, v => (v.value = v.initValue));
do {
 done = true;
 each(this._overrides, ov => {
  if (ov.others.length === 0) return;
  const max = ov.others.reduce(
origin: TryGhost/Ghost-CLI

each(omitFields(data), (value, key) => {
lodash(npm)each

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

  • glob
    a little globber
  • path
  • superagent
    elegant & feature rich browser / node HTTP with a fluent API
  • redis
    Redis client library
  • minimist
    parse argument options
  • through2
    A tiny wrapper around Node.js streams.Transform (Streams2/3) to avoid explicit subclassing noise
  • semver
    The semantic version parser used by npm.
  • chalk
    Terminal string styling done right
  • moment
    Parse, validate, manipulate, and display dates
  • Best plugins for Eclipse
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