UNPKG

@atomist/automation-client

Version:
17 lines 459 B
"use strict"; 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