flatten.js 328 B

1234567891011121314
  1. "use strict";
  2. var o = [1, 2, [3, 4, [5, 6], 7, 8], 9, 10, [11, 12, [13, 14]], 15];
  3. module.exports = {
  4. "__generic": function (t, a) {
  5. a(t.call(this).length, 3);
  6. },
  7. "Nested Arrays": function (t, a) {
  8. var result = t.call(o);
  9. a.not(o, result);
  10. a.deep(result, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]);
  11. }
  12. };