| 560 | } |
| 561 | |
| 562 | function getJSPaths(path, left, accumulator) { |
| 563 | accumulator = accumulator || []; |
| 564 | left = left || ''; |
| 565 | if (typeof path === 'string') { |
| 566 | var p = left + path; |
| 567 | if (p.toLowerCase().lastIndexOf('.js') !== p.length - 3) { |
| 568 | p += '.js'; |
| 569 | } |
| 570 | accumulator.push(p); |
| 571 | } else if (Array.isArray(path)) { |
| 572 | path.forEach(function (p) { |
| 573 | getJSPaths(p, left, accumulator); |
| 574 | }); |
| 575 | } else { |
| 576 | for (var p in path) { |
| 577 | getJSPaths(path[p], left + p, accumulator); |
| 578 | } |
| 579 | } |
| 580 | return accumulator; |
| 581 | } |
| 582 | |
| 583 | function filterEmptyValues(arr) { |
| 584 | if (!Array.isArray(arr)) { |