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

How to use
isArray
function
in
LoDashStatic

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

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

// Helper to set the LANDO_LOAD_KEYS var
const getKeys = (keys = true) => {
 if (_.isArray(keys)) return keys.join(' ');
 return keys.toString();
}
origin: lando/lando

_.mergeWith(old, ...fresh, (s, f) => {
 if (_.isArray(s)) return _.uniq(s.concat(f));
})
origin: lando/lando

constructor(id, options = {}) {
   options = _.merge({}, config, options);
   // Make sure our command is an array
   if (!_.isArray(options.command)) options.command = [options.command];
   options.command = options.command.join(' && ');
   // Build the goz
   const go = {
    image: `golang:${options.version}`,
    ports: (options.command !== 'tail -f /dev/null') ? ['80'] : [],
    command: `/bin/sh -c "${options.command}"`,
   };
   // Send it downstream
   super(id, options, {services: _.set({}, options.name, go)});
  }
origin: lando/lando

/*
  * This event makes sure that tooling and event commands that are run against an app container
  * are run through /helpers/psh-exec.sh first so they get the needed envvars eg HOME, USER, and PLATFORM_* set
  */
 lando.events.on('pre-command-runner', app => {
  if (_.get(app, 'config.recipe') === 'platformsh') {
   // This is a cheap way to get the list of platform appservers
   // @TODO: will node, python, etc appserver still use `web`?
   const appCache = lando.cache.get(`${app.name}.compose.cache`) || {};
   const appservers = _(appCache.info).filter(info => info.meUser === 'web').map('service').value();

   // Loop through the tooling
   _.forEach(app.config.tooling, (tooling, name) => {
    // Standardize and arrayify tooling
    const cmd = tooling.cmd ? tooling.cmd : tooling.name;
    const cmds = (!_.isArray(cmd)) ? [cmd] : cmd;
    // Reset tooling
    tooling.cmd = utils.setPshExec(cmds, tooling.service, appservers);
   });

   // Loop through the events
   _.forEach(app.config.events, (event, name) => {
    app.config.events[name] = utils.setPshExec(event, 'app', appservers);
   });
  }
 });
origin: lando/lando

_.map(cmds, cmd => {
 // Discover the service
 const command = getCommand(cmd);
 const service = getService(cmd, data);
 // Validate the service if we can
 // @NOTE fast engine runs might not have this data yet
 if (app.services && !_.includes(app.services, service)) {
  throw new Error(`This app has no service called ${service}`);
 }
 // Add the build command
 return {
  id: `${app.project}_${service}_1`,
  cmd: ['/bin/sh', '-c', _.isArray(command) ? command.join(' ') : command],
  compose: app.compose,
  project: app.project,
  opts: {
   cstdio: ['inherit', 'pipe', 'pipe'],
   mode: 'attach',
   user: getUser(service, app.info),
   services: [service],
  },
 };
})
origin: lando/lando

// Go through each service
 _.forEach(services, service => {
  // Loop through all internal, legacy and user steps
  _.forEach(rootSteps.concat(buildSteps), section => {
   // If the service has build sections let's loop through and run some commands
   if (!_.isEmpty(_.get(app, `config.services.${service}.${section}`, []))) {
    // Run each command
    _.forEach(app.config.services[service][section], cmd => {
     const container = `${app.project}_${service}_1`;
     build.push({
      id: container,
      cmd: ['/bin/sh', '-c', _.isArray(cmd) ? cmd.join(' ') : cmd],
      compose: app.compose,
      project: app.project,
      opts: {
       mode: 'attach',
       cstdio: ['inherit', 'pipe', 'pipe'],
       prestart,
       user: (_.includes(rootSteps, section)) ? 'root' : getUser(service, app.info),
       services: [service],
      },
     });
    });
   }
  });
 });
origin: princejwesley/Mancy

function saveHistory(event, cmds = []) {
 if(noAccessToHistory ||
  historySize === 0 ||
  !_.isArray(cmds) ||
  cmds.length === 0
 ) { return; }
 // remove adjacent duplicates
 history = _.uniq(history.concat(cmds), true);
 // trim history
 updateHistorySize(null, historySize);
 // rewrite
 fs.writeFile(HISTORY_FILE, JSON.stringify(history), (err) => {
  if(err) {
   noAccessToHistory = true;
   console.error(`Failed to write history file ${err.message}`);
  }
 });
}
origin: lando/lando

constructor(id, options = {}) {
   options = _.merge({}, config, options);
   // Arrayify the hosts if needed
   if (!_.isArray(options.hosts)) options.hosts = [options.hosts];
   // Switch to legacy command if needed
   if (semver.lt(`${options.version}.0`, '5.0.0')) options.command = '/run.sh phpmyadmin';
   // Build the default stuff here
   const pma = {
    image: `phpmyadmin/phpmyadmin:${options.version}`,
    environment: {
     MYSQL_ROOT_PASSWORD: '',
     PMA_HOSTS: options.hosts.join(','),
     PMA_PORT: 3306,
     PMA_USER: 'root',
     PMA_PASSWORD: '',
     UPLOAD_LIMIT: 'NOLIMITS!',
    },
    ports: ['80'],
    command: options.command,
   };
   // Add some info
   options.info = {backends: options.hosts};
   // Send it downstream
   super(id, options, {services: _.set({}, options.name, pma)});
  }
origin: lando/lando

constructor(id, options = {}, factory) {
   options = _.merge({}, config, options);
   if (!_.isArray(options.backends)) options.backends = [options.backends];
origin: lando/lando

constructor(id, options = {}) {
   options = _.merge({}, config, options);
   if (!_.isArray(options.command)) options.command = [options.command];
   options.command = options.command.join(' && ');
origin: lando/lando

constructor(id, options = {}) {
   options = _.merge({}, config, options);
   // Make sure our command is an array
   if (!_.isArray(options.command)) options.command = [options.command];
   options.command = options.command.join(' && ');
   // Build the nodez
   const dotnet = {
    image: `microsoft/dotnet:${options.version}-sdk`,
    environment: {
     PATH: options.path.join(':'),
     ASPNETCORE_URLS: `http://+:${options.port}`,
    },
    ports: (options.command !== 'tail -f /dev/null') ? [options.port] : [],
    volumes: options.volumes,
    command: `/bin/sh -c "${options.command}"`,
   };
   // Send it downstream
   super(id, options, {services: _.set({}, options.name, dotnet)});
  }
origin: lando/lando

constructor(id, options = {}) {
   options = _.merge({}, config, options);
   // Make sure our command is an array
   if (!_.isArray(options.command)) options.command = [options.command];
   options.command = options.command.join(' && ');
   // Build the nodez
   const ruby = {
    image: `ruby:${options.version}`,
    environment: {
     PATH: options.path.join(':'),
    },
    ports: (options.command !== 'tail -f /dev/null') ? [options.port] : [],
    volumes: options.volumes,
    command: `/bin/sh -c "${options.command}"`,
   };
   // Add port to "moreHttpsPorts"
   options.moreHttpPorts.push(options.port);
   // Send it downstream
   super(id, options, {services: _.set({}, options.name, ruby)});
  }
origin: o2team/athena

function mergeArrayConcatCustomizer(objValue, srcValue) {
    if (_.isArray(objValue)) {
     return objValue.concat(srcValue);
    }
   }
origin: lando/lando

constructor(id, options = {}) {
   options = _.merge({}, config, options);
   // Make sure our command is an array
   if (!_.isArray(options.command)) options.command = [options.command];
   options.command = options.command.join(' && ');
   // Build the nodez
   const python = {
    image: `python:${options.version}`,
    environment: {
     PATH: options.path.join(':'),
     PIP_USER: 'true',
     PYTHONUSERBASE: '/var/www/.local',
    },
    ports: (options.command !== 'tail -f /dev/null') ? [options.port] : [],
    volumes: options.volumes,
    command: `/bin/sh -c "${options.command}"`,
   };
   // Add port to "moreHttpsPorts"
   options.moreHttpPorts.push(options.port);
   // Send it downstream
   super(id, options, {services: _.set({}, options.name, python)});
  }
lodash(npm)LoDashStaticisArray

JSDoc

Checks if value is classified as an Array object.

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

  • readable-stream
    Streams3, a user-land copy of the stream library from Node.js
  • mime-types
    The ultimate javascript content-type utility.
  • node-fetch
    A light-weight module that brings window.fetch to node.js
  • through2
    A tiny wrapper around Node.js streams.Transform (Streams2/3) to avoid explicit subclassing noise
  • minimatch
    a glob matcher in javascript
  • async
    Higher-order functions and common patterns for asynchronous code
  • request
    Simplified HTTP request client.
  • rimraf
    A deep deletion module for node (like `rm -rf`)
  • q
    A library for promises (CommonJS/Promises/A,B,D)
  • CodeWhisperer alternatives
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