mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-08 07:10:54 +00:00
Add post-modifier stuff to Apollo. Add convenience methods to FineWrapper for dealing with things that are expected to only have one instance at any given time.
This commit is contained in:
parent
127184f997
commit
b51306019a
2 changed files with 31 additions and 5 deletions
|
@ -337,6 +337,14 @@ export class FineWrapper extends EventEmitter {
|
|||
this._class = null;
|
||||
}
|
||||
|
||||
get first() {
|
||||
return this.toArray()[0];
|
||||
}
|
||||
|
||||
toArray() {
|
||||
return Array.from(this.instances);
|
||||
}
|
||||
|
||||
ready(fn) {
|
||||
if ( this._class )
|
||||
fn(this._class, this.instances);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue