Maps UUIDs to arrays of Feature instances.
Tracks pending lookups.
Deregister/remove a feature by instance/object. If there is any pending promise for that UUID, rejects it.
Promise-based lookup by UUID. If available, resolves immediately. If not yet present, returns a promise that resolves when the feature is registered.
Promise resolving to collection of features.
FeatureRegistry – Central registry for storing, retrieving, and managing features (by UUID). Handles registration, deregistration, lookup, and resolves pending promises for features that may be registered after the lookup request is made (enabling asynchronous behavior).
Exposes both raw Promise-based lookup (getFeatureByUUID) and observable array/object management.
Method
registerFeature(feature) - Registers a feature (wrapping as Feature if needed).
Method
deregisterFeature(feature) - Deregisters and rejects any pending promises for it.
Method
getFeatureByUUID(uuid) - Returns a Promise resolving to the feature(s) by UUID.
Method
getObjectByUUID(uuid) - Returns a RegistryObject for batch operations on all features by UUID.
Example