union.js 326 B

123456789101112
  1. define(['./restArguments', './uniq', './_flatten'], function (restArguments, uniq, _flatten) {
  2. // Produce an array that contains the union: each distinct element from all of
  3. // the passed-in arrays.
  4. var union = restArguments(function(arrays) {
  5. return uniq(_flatten(arrays, true, true));
  6. });
  7. return union;
  8. });