UNPKG

filepond

Version:

FilePond, where files go to stretch their bits.

28 lines (27 loc) • 531 B
/*! * FilePond v5.0.2 * Copyright (c) 2017-2026 Pqina B.V. * Released under the MIT License * https://filepond.com */ function o() { let n = []; return { /** Subscribe to an event */ on(u, s) { const t = { event: u, callback: s }; return n.push(t), () => { n = n.filter((e) => e !== t); }; }, /** Publish an event */ pub(u, s) { const t = n.filter((e) => e.event === u); for (const e of t) n.includes(e) && e.callback(s); } }; } export { o as pubsub };