How to use the intersection function from underscore

Find comprehensive JavaScript underscore.intersection code examples handpicked from public code repositorys.

3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
const newSignals = _.difference(
    allSignals,
    renderedSignals.concat(hiddentSignals)
);
renderedSignals = renderedSignals.concat(newSignals);
renderedSignals = _.intersection(
    renderedSignals,
    allSignals
);
hiddentSignals = _.difference(
fork icon0
star icon2
watch icon3

+ 5 other calls in file

380
381
382
383
384
385
386
387
388
389
  if (rules === '*') {
    return true;
  }
  var arrayRules = _.isArray(rules) ? rules : rules.split(',');
  var arrayContexts = _.isArray(contexts) ? contexts : contexts.split(',');
  return _.intersection(arrayContexts, arrayRules).length !== 0;
},

/**
 * @method getTransport
fork icon0
star icon1
watch icon1