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 system. It is developed to power our online editing platform [Substance](http://substance.io).

12 lines (10 loc) 362 B
import Registry from '../util/Registry' export default 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)) } }) } }