@atomist/automation-client
Version:
Atomist API for software low-level client
17 lines • 459 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
function toFactory(fact) {
const detyped = fact;
try {
const chf = () => new detyped();
// Try it to see if it works
chf();
return chf;
}
catch (e) {
// If we didn't succeed in using the constructor, try the other way
return detyped;
}
}
exports.toFactory = toFactory;
//# sourceMappingURL=constructionUtils.js.map