From 798978ff34d48e900dd9bb1f425e41da8ac1c114 Mon Sep 17 00:00:00 2001 From: beefchimi Date: Tue, 30 Jul 2024 21:18:23 -0400 Subject: [PATCH] :art: [Format] Earwurm folder --- pkg/earwurm/src/Earwurm.ts | 6 +++--- pkg/earwurm/src/Sound.ts | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/pkg/earwurm/src/Earwurm.ts b/pkg/earwurm/src/Earwurm.ts index ef22d15..77a7b9b 100644 --- a/pkg/earwurm/src/Earwurm.ts +++ b/pkg/earwurm/src/Earwurm.ts @@ -197,9 +197,9 @@ export class Earwurm extends EmittenCommon { suspend() { if ( - this._state === 'closed' - || this._state === 'suspended' - || this._state === 'suspending' + this._state === 'closed' || + this._state === 'suspended' || + this._state === 'suspending' ) { return this; } diff --git a/pkg/earwurm/src/Sound.ts b/pkg/earwurm/src/Sound.ts index 35efeaf..c39b058 100644 --- a/pkg/earwurm/src/Sound.ts +++ b/pkg/earwurm/src/Sound.ts @@ -177,8 +177,8 @@ export class Sound extends EmittenCommon { // Not yet sure how to resolve this. this.#incrementLoop(); - const timeSince - = Math.max(this.context.currentTime - this.#timestamp, 0) * this.speed; + const timeSince = + Math.max(this.context.currentTime - this.#timestamp, 0) * this.speed; this.#progress.elapsed = clamp( 0, @@ -255,9 +255,9 @@ export class Sound extends EmittenCommon { this.emit('state', value); if (value === 'playing') { - this.#intervalId = this.hasProgressSub - ? requestAnimationFrame(this.#handleInterval) - : 0; + this.#intervalId = this.hasProgressSub ? + requestAnimationFrame(this.#handleInterval) : + 0; } // TODO: This should not be broken onto a separate line. else { @@ -275,9 +275,9 @@ export class Sound extends EmittenCommon { if (!this.loop) return; if ( - this.#progress.elapsed === this.duration - || this.#progress.remaining === 0 - || this.#progress.percentage === 100 + this.#progress.elapsed === this.duration || + this.#progress.remaining === 0 || + this.#progress.percentage === 100 ) { this.#progress.elapsed = 0; this.#progress.remaining = this.duration;