* Normalize an external block type to its registry key form: dashes become * underscores (some external sources use either form).
(type: string)
| 13 | * underscores (some external sources use either form). |
| 14 | */ |
| 15 | function normalizeType(type: string): string { |
| 16 | return type.replace(/-/g, '_') |
| 17 | } |
| 18 | |
| 19 | /** Get the block config for a single block type. */ |
| 20 | export function getBlock(type: string): BlockConfig | undefined { |
no test coverage detected