Tabnine Logo For Javascript
Array.concat
Code IndexAdd Tabnine to your IDE (free)

How to use
concat
function
in
Array

Best JavaScript code snippets using builtins.Array.concat(Showing top 15 results out of 20,628)

origin: cube-js/cube.js

granularityParentHierarchy(granularity) {
  if (!this.granularityParentHierarchyCache[granularity]) {
   this.granularityParentHierarchyCache[granularity] = [granularity].concat(
    this.granularityParent(granularity) ? this.granularityParentHierarchy(this.granularityParent(granularity)) : []
   );
  }
  return this.granularityParentHierarchyCache[granularity];
 }
origin: enquirer/enquirer

end() {
  let pos = this.choices.length - this.limit;
  let choices = reorder(this.choices);
  this.choices = choices.slice(pos).concat(choices.slice(0, pos));
  this.index = this.limit - 1;
  return this.render();
 }
origin: Flood-UI/flood

[
 'FETCH_TRANSFER_SUMMARY_ERROR',
 'FETCH_TRANSFER_SUMMARY_SUCCESS',
 'TRANSFER_SUMMARY_DIFF_CHANGE',
].concat(
 // Create an array of event types based on the available snapshots.
 Object.keys(historySnapshotTypes).reduce((accumulator, snapshotType) => {
  accumulator.push(`${snapshotType}_SNAPSHOT_FULL_UPDATE`, `${snapshotType}_SNAPSHOT_DIFF_CHANGE`);

  return accumulator;
 }, []),
)
origin: princejwesley/Mancy

getAllProps() {
  let names = Object.getOwnPropertyNames(this.props.fun);
  let symbols = Object.getOwnPropertySymbols(this.props.fun);
  return _.sortBy(names.concat(symbols), (value) => {
   return value.toString();
  });
 }
origin: strapi/strapi

Object.keys(strapi.plugins).reduce((acc, current) => {
   const isDocumentationNeeded = this.isPluginDocumentationNeeded(current);

   if (isDocumentationNeeded) {
    return acc.concat(current);
   }

   return acc;
  }, [])
origin: stdlib-js/stdlib

function addNonParamAttributes(items) {
  var types = [];

  items.forEach(function(item) {
    types = types.concat( buildItemTypeStrings(item) );
  });

  return types;
}
origin: axa-group/nlp.js

walkTaggedTemplate(node, context) {
  const tag = this.walk(node.tag, context);
  const { quasi } = node;
  const strings = quasi.quasis.map((q) => this.walk(q, context));
  const values = quasi.expressions.map((e) => this.walk(e, context));
  // eslint-disable-next-line
  return tag.apply(null, [strings].concat(values));
 }
origin: cube-js/cube.js

rollupGranularity() {
  if (!this.rollupGranularityValue) {
   this.rollupGranularityValue =
    this.query.cacheValue(
     ['rollupGranularity', this.granularity].concat(this.dateRange),
     () => this.query.minGranularity(this.granularity, this.dateRangeGranularity())
    );
  }
  return this.rollupGranularityValue;
 }
origin: FormidableLabs/nodejs-dashboard

// Mimic commander syntax errors (with offsets) for consistency
/* eslint-disable no-console */
const exitWithError = function () {
 const args = Array.prototype.slice.call(arguments);
 console.error();
 console.error(...[" "].concat(args));
 console.error();
 process.exit(1); // eslint-disable-line no-process-exit
}
origin: moleculerjs/moleculer

/**
   * Return a service settings without protected properties.
   *
   * @param {Object?} settings
   */
  _getPublicSettings(settings) {
    if (settings && Array.isArray(settings.$secureSettings)) {
      return _.omit(settings, [].concat(settings.$secureSettings, ["$secureSettings"]));
    }

    return settings;
  }
origin: parse-community/parse-server

log(level, args) {
  // make the passed in arguments object an array with the spread operator
  args = this.maskSensitive([...args]);
  args = [].concat(level, args.map(arg => {
   if (typeof arg === 'function') {
    return arg();
   }

   return arg;
  }));
  this.adapter.log.apply(this.adapter, args);
 }
origin: lukeed/taskr

patterns.forEach((pat, i) => {
    if (hasIgnore(pat)) {
      return;
    }

    ignore = ignores.concat(
      patterns.slice(i).filter(hasIgnore).map(p => p.slice(1))
    )

    globs.push({
      pattern: pat,
      options: Object.assign(opts, { ignore })
    });
  });
origin: Automattic/wp-calypso

export function convert( blob, options ) {
  let ranges = new Array();
  options = options || {};
  options.links = 'undefined' === typeof options.links ? true : options.links;
  ranges = ranges.concat( blob.ranges || [] );
  ranges = ranges.concat( blob.media || [] );
  return recurse_convert( blob.text, ranges, options );
}
origin: withspectrum/spectrum

// @flow

// Convert an array of relative growth numbers to an array of absolute ones
// [1, 2, 3, 1] => [1, 3, 6, 7]
const relativeToAbsolute = (input: Array<number>): Array<number> =>
 input.reduce(
  (arr, val) => {
   return arr.concat([arr[arr.length - 1] + val]);
  },
  [input[0]]
 )
origin: enquirer/enquirer

map(names = [], prop = 'value') {
  return [].concat(names || []).reduce((acc, name) => {
   acc[name] = this.find(name, prop);
   return acc;
  }, {});
 }
builtins(MDN)Arrayconcat

JSDoc

Combines two or more arrays.

Most used builtins functions

  • Console.log
  • Console.error
  • Promise.then
    Attaches callbacks for the resolution and/or rejection of the Promise.
  • Promise.catch
    Attaches a callback for only the rejection of the Promise.
  • Array.push
    Appends new elements to an array, and returns the new length of the array.
  • Array.length,
  • Array.map,
  • String.indexOf,
  • fetch,
  • Window.location,
  • Window.addEventListener,
  • ObjectConstructor.keys,
  • Array.forEach,
  • Location.reload,
  • Response.status,
  • Navigator.serviceWorker,
  • ServiceWorkerContainer.register,
  • ServiceWorkerRegistration.installing,
  • ServiceWorkerContainer.controller

Popular in JavaScript

  • request
    Simplified HTTP request client.
  • through2
    A tiny wrapper around Node.js streams.Transform (Streams2/3) to avoid explicit subclassing noise
  • cheerio
    Tiny, fast, and elegant implementation of core jQuery designed specifically for the server
  • ws
    Simple to use, blazing fast and thoroughly tested websocket client and server for Node.js
  • winston
    A logger for just about everything.
  • aws-sdk
    AWS SDK for JavaScript
  • axios
    Promise based HTTP client for the browser and node.js
  • debug
    small debugging utility
  • handlebars
    Handlebars provides the power necessary to let you build semantic templates effectively with no frustration
  • 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