* Create all of the node's hook dispatchers.
()
| 1773 | * Create all of the node's hook dispatchers. |
| 1774 | */ |
| 1775 | function createHooks(): FormKitHooks { |
| 1776 | const hooks: Map<string, FormKitDispatcher<unknown>> = new Map() |
| 1777 | return new Proxy(hooks, { |
| 1778 | get(_, property: string) { |
| 1779 | if (!hooks.has(property)) { |
| 1780 | hooks.set(property, createDispatcher()) |
| 1781 | } |
| 1782 | return hooks.get(property) |
| 1783 | }, |
| 1784 | }) as unknown as FormKitHooks |
| 1785 | } |
| 1786 | |
| 1787 | /** |
| 1788 | * This is a simple integer counter of every createName() where the name needs |