UNPKG

@ai-stack/payloadcms

Version:

<p align="center"> <img alt="Payload AI Plugin" src="assets/payload-ai-intro.gif" width="100%" /> </p>

14 lines (13 loc) 490 B
import { getFieldBySchemaPath } from './getFieldBySchemaPath.js'; export const getFieldInfo = (collections, schemaPath)=>{ let fieldInfo = null; //TODO: Only run below for enabled collections for(const collectionsKey in collections){ const collection = collections[collectionsKey]; fieldInfo = getFieldBySchemaPath(collection.config, schemaPath); if (fieldInfo) { return fieldInfo; } } }; //# sourceMappingURL=getFieldInfo.js.map