@backstage/backend-test-utils
Version:
Test helpers library for Backstage backends
19 lines (16 loc) • 434 B
JavaScript
;
function isPromise(value) {
return typeof value === "object" && value !== null && "then" in value && typeof value.then === "function";
}
function unwrapFeature(feature) {
if ("$$type" in feature) {
return feature;
}
if ("default" in feature) {
return feature.default;
}
return feature;
}
exports.isPromise = isPromise;
exports.unwrapFeature = unwrapFeature;
//# sourceMappingURL=helpers.cjs.js.map