UNPKG

substance

Version:

Substance is a JavaScript library for web-based content editing. It provides building blocks for realizing custom text editors and web-based publishing systems.

14 lines (11 loc) 374 B
import { Registry } from '../util' class ComponentRegistry extends Registry { constructor(entries) { super(entries, function(ComponentClass) { if (!ComponentClass.prototype._isComponent) { throw new Error('Component registry: wrong type. Expected a ComponentClass. Was: ' + String(ComponentClass)) } }) } } export default ComponentRegistry