UNPKG

@hakit/core

Version:

A collection of React hooks and helpers for Home Assistant to easily communicate with the Home Assistant WebSocket API.

12 lines (11 loc) 335 B
const r = {}, u = async (o, m, i, a, t, ...p) => { const c = Date.now(), s = `${o}-${t}`, e = r[s]; if (e && c - e.timestamp < m) return e.promise; const n = i(a, t, ...p); return r[s] = { timestamp: c, promise: n }, n; }; export { u as timeCacheEntityPromiseFunc }; //# sourceMappingURL=time-cache-entity-promise.js.map