UNPKG

ts-simple-ast

Version:

TypeScript compiler wrapper for AST navigation and code generation.

18 lines (16 loc) 367 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); // todo: tests function createLazy(func) { let hasRun = false; let val; return () => { if (hasRun) return val; val = func(); hasRun = true; return val; }; } exports.createLazy = createLazy; //# sourceMappingURL=createLazy.js.map