MCPcopy Create free account
hub / github.com/ehmicky/log-process-errors / isRepeated

Function isRepeated

src/repeat.js:19–29  ·  view source on GitHub ↗
(value, previousEvents)

Source from the content-addressed store, hash-verified

17// - Can take up some memory, but it should be cleaned up by
18// `removeListener()`, i.e. once `eventListener` is garbage collected.
19export const isRepeated = (value, previousEvents) => {
20 const previousEvent = getPreviousEvent(value)
21
22 if (previousEvents.includes(previousEvent)) {
23 return true
24 }
25
26 // eslint-disable-next-line fp/no-mutating-methods
27 previousEvents.push(previousEvent)
28 return false
29}
30
31// Serialize `value` into a short fingerprint.
32// We truncate fingerprints to prevent consuming too much memory in case `value`

Callers 1

handleEventFunction · 0.90

Calls 1

getPreviousEventFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…