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