* Helper function to lazy-load an initialize-once value. * @template T Return value of initializer * @param {()=>T} initializer Initializer of the lazily loaded value. * @returns {()=>T}
(initializer)
| 770 | * @returns {()=>T} |
| 771 | */ |
| 772 | function getLazy(initializer) { |
| 773 | let value; |
| 774 | let initialized = false; |
| 775 | return function() { |
| 776 | if (initialized === false) { |
| 777 | value = initializer(); |
| 778 | initialized = true; |
| 779 | } |
| 780 | return value; |
| 781 | }; |
| 782 | } |
| 783 | |
| 784 | // Setup user-facing NODE_V8_COVERAGE environment variable that writes |
| 785 | // ScriptCoverage objects to a specified directory. |
no outgoing calls
no test coverage detected
searching dependent graphs…