MCPcopy
hub / github.com/shipshapecode/shepherd / once

Method once

shepherd.js/src/evented.ts:42–44  ·  view source on GitHub ↗

* Adds an event listener that only fires once for the given event string. * * @param {string} event * @param {Function} handler * @param ctx * @returns

(event: string, handler: AnyHandler, ctx?: unknown)

Source from the content-addressed store, hash-verified

40 * @returns
41 */
42 once(event: string, handler: AnyHandler, ctx?: unknown) {
43 return this.on(event, handler, ctx, true);
44 }
45
46 /**
47 * Removes an event listener for the given event string.

Callers 1

evented.spec.jsFile · 0.80

Calls 1

onMethod · 0.95

Tested by

no test coverage detected