@wordpress/block-library
Version:
Block library for the WordPress editor.
15 lines (14 loc) • 369 B
JavaScript
/**
* Checks if the block is experimental based on the metadata loaded
* from block.json.
*
* @param {Object} metadata Parsed block.json metadata.
* @return {boolean} Is the block experimental?
*/
export default function isBlockMetadataExperimental( metadata ) {
return (
metadata &&
'__experimental' in metadata &&
metadata.__experimental !== false
);
}