MCPcopy Index your code
hub / github.com/tinyhttp/tinyhttp / all

Method all

packages/session/src/index.ts:599–609  ·  view source on GitHub ↗
(cb: (err?: any, sessions?: Record<string, any>) => void)

Source from the content-addressed store, hash-verified

597 }
598
599 all(cb: (err?: any, sessions?: Record<string, any>) => void) {
600 const sessionIds = Object.keys(this.sessions)
601 const sessions: Record<string, any> = {}
602
603 for (const id of sessionIds) {
604 const session = this.getSession(id)
605 if (session) sessions[id] = session
606 }
607
608 cb && setImmediate(() => cb(null, sessions))
609 }
610
611 /**
612 * Clear all sessions

Callers 1

lengthMethod · 0.95

Calls 1

getSessionMethod · 0.95

Tested by

no test coverage detected