From f598dcbf6283f2c2b81a63d315548c6bc4e943fb Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Sun, 29 Sep 2024 15:06:59 +0800 Subject: style: prettier --- src/utils.mjs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/utils.mjs') diff --git a/src/utils.mjs b/src/utils.mjs index ad9131e..3824672 100644 --- a/src/utils.mjs +++ b/src/utils.mjs @@ -6,7 +6,7 @@ */ export const onRemove = (element, callback) => { const parent = element.parentNode; - if (!parent) throw new Error("The node must already be attached"); + if (!parent) throw new Error('The node must already be attached'); const obs = new MutationObserver(mutations => { for (const mutation of mutations) { @@ -33,7 +33,7 @@ export const onRemove = (element, callback) => { */ export const animateRectTransition = (element, rect, options = {}) => { if (!element.parentElement) - throw new Error("The node must already be attached"); + throw new Error('The node must already be attached'); const { width: w1, height: h1, left: x1, top: y1 } = rect; const { @@ -62,7 +62,7 @@ export const animateRectTransition = (element, rect, options = {}) => { return element.animate(keyframes, { duration: options.duration ?? 500, - easing: "ease-in-out", + easing: 'ease-in-out', }); }; @@ -82,7 +82,7 @@ export function throttle(func, delay) { timerFlag = setTimeout( () => (timerFlag = null), - typeof delay === "function" ? delay.call(context) : delay, + typeof delay === 'function' ? delay.call(context) : delay, ); return func.call(context, ...args); -- cgit v1.2.3-70-g09d2