text: // Generated by CoffeeScript 2.5.1
  module.exports = {
    compare: function(array1, array2) {
      var i, k, ref;
      // compare lengths - can save a lot of time 
      if (array1.length !== array2.length) {
        return false;
      }
      for (i = k = 0, ref = array1.length; (0 <= ref ? k < ref : k > ref); i = 0 <= ref ? ++k : --k) {
        // Check if we have nested arrays
        if (Array.isArray(array1[i]) && Array.isArray(array2[i])) {
          if (!array1[i].equals(array2[i])) {
            return false;
          }
        } else if (array1[i] !== array2[i]) {
          // Warning - two different object instances will never be equal: {x:20} != {x:20}
          return false;
        }
      }
      return true;
    },
    intersect: function(array) {
      var argument, i, item, j, k, l, len, len1, result;
      if (array === null) {
        return [];
      }
      result = [];
      for (i = k = 0, len = array.length; k < len; i = ++k) {
        item = array[i];
        if (result.indexOf(item) !== -1) {
          continue;
        }
        for (j = l = 0, len1 = arguments.length; l < len1; j = ++l) {
          argument = arguments[j];
          if (argument.indexOf(item) === -1) {
            break;
          }
        }
        if (j === arguments.length) {
          result.push(item);
        }
      }
      return result;
    },
    flatten: function(arr, depth = -1) {
      var i, k, ref, ret;
      ret = [];
      for (i = k = 0, ref = arr.length; (0 <= ref ? k < ref : k > ref); i = 0 <= ref ? ++k : --k) {
        if (Array.isArray(arr[i])) {
          if (depth === 0) {
            ret.push(...arr[i]);
          } else {
            ret.push(...module.exports.flatten(arr[i], depth - 1));
          }
        } else {
          ret.push(arr[i]);
        }
      }
      return ret;
    },
    merge: function(...arrays) {
      var array, el, k, l, len, len1, r;
      r = [];
      for (k = 0, len = arrays.length; k < len; k++) {
        array = arrays[k];
        for (l = 0, len1 = array.length; l < len1; l++) {
          el = array[l];
          r.push(el);
        }
      }
      return r;
    },
    unique: function(array) {
      var el, k, len, o;
      o = {};
      for (k = 0, len = array.length; k < len; k++) {
        el = array[k];
        o[el] = true;
      }
      return Object.keys(o);
    }
  };
  