* Ensure an object output, and if the input is a function, execute it expecting an object output
(input)
| 62 | * Ensure an object output, and if the input is a function, execute it expecting an object output |
| 63 | */ |
| 64 | function normalizeObject(input) { |
| 65 | // Unwrap the functions |
| 66 | if( input && isFunction(input) ) { |
| 67 | return normalizeObject( input() ); |
| 68 | } |
| 69 | |
| 70 | // the object as it is |
| 71 | return input; |
| 72 | } |
| 73 | |
| 74 | /** |
| 75 | * Clamp the string for CLI output |
no test coverage detected