(items)
| 33 | * @param {(string | Item<T>)[]} items items |
| 34 | */ |
| 35 | const array = (items) => { |
| 36 | for (const item of items) { |
| 37 | if (typeof item === "string") { |
| 38 | fn(item, normalizeSimple(item, item)); |
| 39 | } else if (item && typeof item === "object") { |
| 40 | object(item); |
| 41 | } else { |
| 42 | throw new Error("Unexpected options format"); |
| 43 | } |
| 44 | } |
| 45 | }; |
| 46 | /** |
| 47 | * Processes the provided obj. |
| 48 | * @param {Item<T>} obj an object |