Configured options. Combination of applicable global-options and the options passed on instantiation.
On-demand observable events. See https://docs.activejs.dev/guides/events for more details.
An Observable to observe future values, unlike the default Observable it doesn't replay when subscribed to, rather it waits for the next value.
A counter to keep track of how many times has a Unit, System, Action or Cluster emitted.
Number of times a Unit, System, Action or Cluster has emitted.
Creates a new Observable using the default Observable as source. Use this to conceal other aspects of a Unit, System, Action or Cluster except the Observable part.
An Observable with the value of a Unit, System, Action or Cluster.
To manually re-emit the last emitted value again.
Converts the value to JSON string, using
This is the most basic building block of ActiveJS.
Base serves as the base for all fundamental ActiveJS constructs: Units, Systems, Actions and Clusters.
This is an internal construct, normally you'd never have to use this class directly. However, if you're just reading the documentation, or want to learn more about how ActiveJS works, or want to extend this class to build something on your own, please continue.
It extends RxJS
Observable. Source of this Observable is either a BehaviorSubject or Subject depending on the BaseConfig.replay flag. By default, it's a BehaviourSubject for the Units, Systems and Clusters; and a Subject for Actions.
There's another non-replaying Observable named
future$to observe the value, whose source is always a simple Subject, This Subject also serves as the source for default extended Observable when BaseConfig.replay is
In simple terms Base is an elaborate RxJS Subject like construct, with custom features like replay on demand. Although that's just one aspect of Base.
It also implements
Object.prototypemethods to make working with the stored value a bit easier and efficient.
Other than that, It also provides functionalities like: On-demand Observable custom-event, to listen to events like manual replay.