(start, end)
| 663 | } |
| 664 | |
| 665 | export function randomInt(start, end) { |
| 666 | if (start > end) { |
| 667 | start++; |
| 668 | end++; |
| 669 | } else if (end === start) { |
| 670 | return start; |
| 671 | } |
| 672 | |
| 673 | const random = Math.random() * (end - start); |
| 674 | return Math.floor(random) + start |
| 675 | } |
| 676 | |
| 677 | export function trimTextNodes(el) { |
| 678 | for (let node of el.childNodes) { |