From 9cb751d1f7cef74aa8da06e8af555f80408e1735 Mon Sep 17 00:00:00 2001 From: beefchimi Date: Tue, 30 Jul 2024 21:19:41 -0400 Subject: [PATCH] fix up into earwurm format --- 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 77a7b9b..ef22d15 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 c39b058..35efeaf 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;