| | |
| | | "use strict"; |
| | | |
| | | /** |
| | | * Defines the item type used by this module. |
| | | * @template T |
| | | * @typedef {Record<string, string | string[] | T>} Item |
| | | */ |
| | | |
| | | /** |
| | | * Defines the container options format type used by this module. |
| | | * @template T |
| | | * @typedef {(string | Item<T>)[] | Item<T>} ContainerOptionsFormat |
| | | */ |
| | | |
| | | /** |
| | | * Processes the provided t. |
| | | * @template T |
| | | * @template N |
| | | * @param {ContainerOptionsFormat<T>} options options passed by the user |
| | |
| | | */ |
| | | const process = (options, normalizeSimple, normalizeOptions, fn) => { |
| | | /** |
| | | * Processes the provided item. |
| | | * @param {(string | Item<T>)[]} items items |
| | | */ |
| | | const array = (items) => { |
| | |
| | | } |
| | | }; |
| | | /** |
| | | * Processes the provided obj. |
| | | * @param {Item<T>} obj an object |
| | | */ |
| | | const object = (obj) => { |
| | |
| | | }; |
| | | |
| | | /** |
| | | * Returns parsed options. |
| | | * @template T |
| | | * @template R |
| | | * @param {ContainerOptionsFormat<T>} options options passed by the user |
| | |
| | | }; |
| | | |
| | | /** |
| | | * Returns options to spread or pass. |
| | | * @template T |
| | | * @param {string} scope scope name |
| | | * @param {ContainerOptionsFormat<T>} options options passed by the user |