Validates and extracts discovery info in one step
This is a convenience function that combines validation and extraction, returning both the validation result and the info if valid.
The discovery extension to validate and extract
Object containing validation result and info (if valid)
const extension = declareDiscoveryExtension(...);const { valid, info, errors } = validateAndExtract(extension);if (valid && info) { // Store info in Bazaar catalog} else { console.error("Validation errors:", errors);} Copy
const extension = declareDiscoveryExtension(...);const { valid, info, errors } = validateAndExtract(extension);if (valid && info) { // Store info in Bazaar catalog} else { console.error("Validation errors:", errors);}
Validates and extracts discovery info in one step
This is a convenience function that combines validation and extraction, returning both the validation result and the info if valid.