Skip to main content
cngx-src documentation

CngxDebouncer

Interface

projects/common/audio/debouncer/debouncer.ts

Import#

import { CngxDebouncer } from '@cngx/common/audio'

Description#

Public handle returned by createDebouncer.

Index#

Methods#

reset#void
reset(name?: string)

Clear the recorded fire time for name, or all names when omitted.

@paramname?string
shouldFire#boolean
shouldFire(name: string)

Returns true if name may fire now, false if an identical name fired within the window. A true result records the fire time; a false result leaves it untouched (so a burst is suppressed against its first fire).

@paramnamestring