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

Function isLimited

src/limit.js:13–20  ·  view source on GitHub ↗
(value, event, previousEvents)

Source from the content-addressed store, hash-verified

11// The `repeated` logic should prevent it most of the times, but it can still
12// happen when `value` is not an `Error` instance and contain dynamic content
13export const isLimited = (value, event, previousEvents) => {
14 if (previousEvents.length < MAX_EVENTS || isLimitedWarning(event, value)) {
15 return false
16 }
17
18 emitWarning(`${PREFIX} "${event}" until process is restarted.`)
19 return true
20}
21
22// The `warning` itself should not be skipped
23const isLimitedWarning = (event, value) =>

Callers 1

handleEventFunction · 0.90

Calls 1

isLimitedWarningFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…