ContentRegistryUtil.js 977 B

1234567891011121314151617181920212223242526272829
  1. "use strict";
  2. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  3. /**
  4. * Licensed Materials - Property of IBM
  5. * IBM Watson Analytics (C) Copyright IBM Corp. 2020
  6. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. */
  8. define([], function () {
  9. var ContentRegistryUtil = function () {
  10. function ContentRegistryUtil() {
  11. _classCallCheck(this, ContentRegistryUtil);
  12. }
  13. ContentRegistryUtil.getCapabilities = function getCapabilities(content) {
  14. var capabilitiesFeature = void 0;
  15. if (content && content.getType()) {
  16. capabilitiesFeature = content.getFeature("ContentRegistry.internal." + content.getType() + "Capabilities");
  17. }
  18. return capabilitiesFeature;
  19. };
  20. return ContentRegistryUtil;
  21. }();
  22. return ContentRegistryUtil;
  23. });
  24. //# sourceMappingURL=ContentRegistryUtil.js.map