Codota Logo For Javascript
Array.bind
Code IndexAdd Codota to your IDE (free)

How to use
bind
function
in
Array

Best JavaScript code snippets using builtins.Array.bind(Showing top 15 results out of 504)

origin: cube-js/cube.js

get filtersWithoutSubQueries() {
  if (!this.filtersWithoutSubQueriesValue) {
   this.filtersWithoutSubQueriesValue = this.allFilters.filter(
    f => this.collectFrom([f], this.collectSubQueryDimensionsFor.bind(this), 'collectSubQueryDimensionsFor').length === 0
   );
  }
  return this.filtersWithoutSubQueriesValue;
 }
origin: laurent22/joplin

const composeEntries = (editor, entries: Entry[]): Element[] => {
 return Arr.bind(Arr.groupBy(entries, isIndented), (entries) => {
  const groupIsIndented = Arr.head(entries).map(isIndented).getOr(false);
  return groupIsIndented ? indentedComposer(editor, entries) : outdentedComposer(editor, entries);
 });
}
origin: princejwesley/Mancy

constructor(props) {
  super(props);
  this.state = _.clone(ReplStatusBarStore.getStore());
  this.onDownload = this.onDownload.bind(this);
  this.onTriggerPreferences = this.onTriggerPreferences.bind(this);
  this.onStoreChange = this.onStoreChange.bind(this);
  this.getActiveHandle = this.getActiveHandle.bind(this);
 }
origin: cube-js/cube.js

query() {
  return this.joinQuery(this.join, this.collectFromMembers(
   false,
   this.collectSubQueryDimensionsFor.bind(this),
   'collectSubQueryDimensionsFor'
  ));
 }
origin: cube-js/cube.js

collectCubeNames(excludeTimeDimensions) {
  return this.collectFromMembers(
   excludeTimeDimensions,
   this.collectCubeNamesFor.bind(this),
   'collectCubeNamesFor'
  );
 }
origin: princejwesley/Mancy

(() => {
 // Temporary fix for node bug : https://github.com/nodejs/node/issues/3158
 let ownPropertyNames = Object.getOwnPropertyNames.bind(Object);

 Object.getOwnPropertyNames = (o) => {
  let result = ownPropertyNames(o);
  let keys = Object.keys(o);
  let difference = _.difference(keys, result);
  return difference.length ? result.concat(difference) : result;
 };
})();
origin: cube-js/cube.js

collectRootMeasureToHieararchy() {
  const notAddedMeasureFilters = R.flatten(this.measureFilters.map(f => f.getMembers()))
   .filter(f => R.none(m => m.measure === f.measure, this.measures));

  return R.fromPairs(this.measures.concat(notAddedMeasureFilters).map(m => {
   const collectedMeasures = this.collectFrom(
    [m],
    this.collectMultipliedMeasures.bind(this),
    'collectMultipliedMeasures',
    this.queryCache
   );
   if (m.expressionName && !collectedMeasures.length) {
    throw new UserError(`Subquery dimension ${m.expressionName} should reference at least one measure`);
   }
   return [m.measure, collectedMeasures];
  }));
 }
origin: cube-js/cube.js

get subQueryDimensions() {
  // eslint-disable-next-line no-underscore-dangle
  if (!this._subQueryDimensions) {
   // eslint-disable-next-line no-underscore-dangle
   this._subQueryDimensions = this.collectFromMembers(
    false,
    this.collectSubQueryDimensionsFor.bind(this),
    'collectSubQueryDimensionsFor'
   );
  }
  // eslint-disable-next-line no-underscore-dangle
  return this._subQueryDimensions;
 }
origin: cube-js/cube.js

checkShouldBuildJoinForMeasureSelect(measures, keyCubeName) {
  return measures.map(measure => {
   const cubeNames = this.collectFrom([measure], this.collectCubeNamesFor.bind(this), 'collectCubeNamesFor');
   if (R.any(cubeName => keyCubeName !== cubeName, cubeNames)) {
    const measuresJoin = this.joinGraph.buildJoin(cubeNames);
    if (measuresJoin.multiplicationFactor[keyCubeName]) {
     throw new UserError(
      `'${measure.measure}' references cubes that lead to row multiplication. Please rewrite it using sub query.`
     );
    }
    return true;
   }
   return false;
  }).reduce((a, b) => a || b);
 }
origin: cube-js/cube.js

keysQuery(primaryKeyDimension, filters) {
  const inlineWhereConditions = [];
  const query = this.rewriteInlineWhere(() => this.joinQuery(
   this.join,
   this.collectFrom(
    this.keyDimensions(primaryKeyDimension),
    this.collectSubQueryDimensionsFor.bind(this),
    'collectSubQueryDimensionsFor'
   )
  ), inlineWhereConditions);
  return `SELECT DISTINCT ${this.keysSelect(primaryKeyDimension)} FROM ${
   query
  } ${this.baseWhere(filters.concat(inlineWhereConditions))}`;
 }
origin: laurent22/joplin

const parseList: Parser = (depth: number, itemSelection: Option<ItemSelection>, selectionState: Cell<boolean>, list: Element): Entry[] => {
 return Arr.bind(Traverse.children(list), (element) => {
  const parser = isList(element) ? parseList : parseItem;
  const newDepth = depth + 1;
  return parser(newDepth, itemSelection, selectionState, element);
 });
}
origin: cube-js/cube.js

constructor(compilers, options) {
  this.compilers = compilers;
  this.cubeEvaluator = compilers.cubeEvaluator;
  this.joinGraph = compilers.joinGraph;
  this.options = options || {};

  this.orderHashToString = this.orderHashToString.bind(this);
  this.defaultOrder = this.defaultOrder.bind(this);

  this.initFromOptions();

  this.granularityParentHierarchyCache = {};
 }
origin: cube-js/cube.js

aggSelectForDimension(cube, dimension, aggFunction) {
  const cubeNamesForTimeDimension = this.collectFrom(
   [dimension],
   this.collectCubeNamesFor.bind(this),
   'collectCubeNamesFor'
  );
  if (cubeNamesForTimeDimension.length === 1 && cubeNamesForTimeDimension[0] === cube) {
   const dimensionSql = this.dimensionSql(dimension);
   return `select ${aggFunction}(${this.convertTz(dimensionSql)}) from ${this.cubeSql(cube)} ${this.asSyntaxTable} ${this.cubeAlias(cube)}`;
  }
  return null;
 }
origin: princejwesley/Mancy

constructor(props) {
  super(props);
  this.state = {
   collapse: true
  }

  this.onToggleCollapse = this.onToggleCollapse.bind(this);
  this.getKeysButLength = this.getKeysButLength.bind(this);
  this.getArrayRecords = this.getArrayRecords.bind(this);
  this.getType = this.getType.bind(this);
  this.getPrototype = this.getPrototype.bind(this);
  this.bindObjectToContext = this.bindObjectToContext.bind(this);
 }
origin: princejwesley/Mancy

constructor(props) {
  super(props);
  this.state = {
   iCollapse: true,
   collapse: true
  };

  this.onToggleCollapse = this.onToggleCollapse.bind(this);
  this.onToggleICollapse = this.onToggleICollapse.bind(this);
  this.getMetaData = this.getMetaData.bind(this);
  this.buildMetaData = this.buildMetaData.bind(this);
 }
builtins(MDN)Arraybind

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

  • qs
    A querystring parser that supports nesting and arrays, with a depth limit
  • ws
    Simple to use, blazing fast and thoroughly tested websocket client and server for Node.js
  • 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.
  • postcss
  • colors
    get colors in your node.js console
  • js-yaml
    YAML 1.2 parser and serializer
  • mime-types
    The ultimate javascript content-type utility.
  • node-fetch
    A light-weight module that brings window.fetch to node.js
  • mongodb
    The official MongoDB driver for Node.js
  • 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