Files
klz-cables.com/.pnpm-store/v10/files/d7/7f2522f0c63bf547502937bde3269bd8982a55e9cbc87d041507eee5ef6cbb5a011117a536b8b7241dcbceb0e74caaf7fd07fd5b49e0e44600cb22d2684c38
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

20 lines
557 B
Plaintext

'use strict'
/**
* Listens for an event on an object and resolves a promise when the event is emitted.
* @param {Object} emitter - The object to listen to.
* @param {string} event - The name of the event to listen for.
* @param {Function} fn - The function to call when the event is emitted.
* @returns {Promise} A promise that resolves when the event is emitted.
*/
function once (emitter, event, fn) {
return new Promise(resolve => {
emitter.on(event, (...args) => {
fn(...args)
resolve()
})
})
}
module.exports = { once }