"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.catObject = catObject;
function _scope() {
  const data = require("@teambit/legacy/dist/scope");
  _scope = function () {
    return data;
  };
  return data;
}
async function catObject(hash, pretty, stringify, headers) {
  const scope = await (0, _scope().loadScope)();
  const object = await scope.getRawObject(hash);
  if (headers) {
    return object.headers;
  }
  if (!object) return 'object not found';
  if (stringify) return JSON.stringify(object.content.toString());
  return object.getString(pretty);
}

//# sourceMappingURL=cat-object.js.map