contentful-management
Version:
Client for Contentful's Content Management API
12 lines (9 loc) • 415 B
JavaScript
import { wrapCursorPaginatedCollection } from '../common-utils.js';
import { toPlainObject, freezeSys } from 'contentful-sdk-core';
function wrapResource(makeRequest, data) {
const resource = toPlainObject(data);
return freezeSys(resource);
}
const wrapResourceCollection = wrapCursorPaginatedCollection(wrapResource);
export { wrapResource, wrapResourceCollection };
//# sourceMappingURL=resource.js.map