(element, className)
| 633 | } |
| 634 | |
| 635 | export function closestByClass(element, className) { |
| 636 | if (className.startsWith('.')) { |
| 637 | className = className.substring(0, className.length - 1); |
| 638 | } |
| 639 | |
| 640 | let current = element; |
| 641 | while (current != null) { |
| 642 | if (hasClass(current, className)) { |
| 643 | return current; |
| 644 | } |
| 645 | current = current.parentNode; |
| 646 | } |
| 647 | |
| 648 | return current; |
| 649 | } |
| 650 | |
| 651 | export function toQueryArgs(obj) { |
| 652 | const searchParams = new URLSearchParams(); |
nothing calls this directly
no test coverage detected