Codota Logo For Javascript
Collection.value
Code IndexAdd Codota to your IDE (free)

How to use
value
function
in
Collection

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

origin: lando/lando

// Helper to get init config
const getInitConfig = dirs => _(dirs)
 .filter(dir => fs.existsSync(dir))
 .flatMap(dir => glob.sync(path.join(dir, '*', 'init.js')))
 .map(file => require(file))
 .value()
origin: lando/lando

lando.engine.list(options)
   // Map each app to a summary and print results
   .then(containers => console.log(lando.cli.formatData(
    _(containers)
     .map(container => _.omit(container, ['lando', 'id', 'instance']))
     .value(),
    options
   )))
origin: lando/lando

// Check for docker compat warnings and surface them nicely as well
 app.events.on('post-start', () => {
  _.forEach(_(lando.versions).filter(version => version.dockerVersion).value(), thing => {
   if (!thing.satisfied) app.addWarning(warnings.unsupportedVersionWarning(thing));
  });
 });
origin: lando/lando

/*
  * Wipe the ENTIRE data source
  */
 delete(source, id) {
  if (!id) throw Error('Specify a resource ID to remove!');
  const database = _(this.read(source)).filter(item => item.id !== id).value();
  this.yaml.dump(path.resolve(this.base, `${source}.yml`), database);
  return id;
 }
origin: lando/lando

// Helper to get tokens
const getTokens = (home, tokens = []) => _(utils.sortTokens(utils.getTerminusTokens(home), tokens))
 .map(token => ({name: token.email, value: token.token}))
 .thru(tokens => tokens.concat([{name: 'add or refresh a token', value: 'more'}]))
 .value()
origin: lando/lando

_(fs.readdirSync(baseDir, {withFileTypes: true}))
  .filter(dirent => dirent.isDirectory())
  .map(dirent => dirent.name)
  .concat('.')
  .map(directory => path.resolve(baseDir, directory, '.platform.app.yaml'))
  .filter(file => fs.existsSync(file))
  .map(file => ({data: yamlPlatform.load(fs.readFileSync(file)), file}))
  .map(data => ({name: data.data.name, file: data.file, dir: path.dirname(data.file)}))
  .value()
origin: lando/lando

_(config.LANDO_METRICS_PLUGINS)
 .map(plugin => _.merge({}, plugin, {path: path.resolve(__dirname, 'plugins', `${plugin.name}.js`)}))
 .filter(plugin => fs.existsSync(plugin.path))
 .map(plugin => _.merge({}, plugin, {Reporter: require(plugin.path)}))
 .value()
origin: lando/lando

// Helper to get init source config
const getInitSourceConfig = dirs => _(dirs)
 .filter(dir => fs.existsSync(dir))
 .flatMap(dir => glob.sync(path.join(dir, '*.js')))
 .map(file => require(file))
 .flatMap(source => source.sources)
 .value()
origin: lando/lando

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

_(_.flatten([...sources]))
 .sortBy('date')
 .groupBy('email')
 .map(tokens => _.last(tokens))
 .value()
origin: lando/lando

_(urls)
  .map(url => exports.parseUrl(url))
  .map(parsedUrl => _.merge({}, parsedUrl, {id: hasher(parsedUrl)}))
  .uniqBy('id')
  .value()
origin: lando/lando

/*
 * Helper to find containers that serve
 */
const getOtherServingContainers = services => _(services)
 .filter(service => service.type === 'lagoon-varnish')
 .map('name')
 .value()
origin: lando/lando

/*
 * Helper to get passthru options
 */
const handlePassthruOpts = (options = {}, answers = {}) => _(options)
 .map((value, key) => _.merge({}, {name: key}, value))
 .filter(value => value.passthrough === true && !_.isNil(answers[value.name]))
 .map(value => `--${value.name}=${answers[value.name]}`)
 .value()
origin: lando/lando

// Helper to get tokens
const getTokens = (home, tokens = []) => _(utils.sortTokens(utils.getPlatformshTokens(home), tokens))
 .map(token => ({name: token.email, value: token.token}))
 .thru(tokens => tokens.concat([{name: 'add or refresh a token', value: 'more'}]))
 .value()
origin: lando/lando

_(_.flatten([...sources]))
 .sortBy('date')
 .groupBy('email')
 .map(tokens => _.last(tokens))
 .value()
lodash(npm)Collectionvalue

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

  • chalk
    Terminal string styling done right
  • express
    Fast, unopinionated, minimalist web framework
  • axios
    Promise based HTTP client for the browser and node.js
  • qs
    A querystring parser that supports nesting and arrays, with a depth limit
  • postcss
  • semver
    The semantic version parser used by npm.
  • glob
    a little globber
  • bluebird
    Full featured Promises/A+ implementation with exceptionally good performance
  • js-yaml
    YAML 1.2 parser and serializer
  • Top plugins for WebStorm
    The challenge is finding the best plugins for JavaScript development on Intellij IDEs. Who wants to sit there and go over hundreds of plugins to pick the best?
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJavascript Code Index
Get Codota for your IDE now