import { createDocumentResource, getCachedDocumentResource } from 'frappe-ui';

export function getDocResource(object) {
	let pg = getCachedDocumentResource(object.doctype, object.name);
	if (!pg) pg = createDocumentResource(object);
	return pg;
}
