MCPcopy
hub / github.com/tj/connect-redis / optionalCb

Function optionalCb

index.ts:6–10  ·  view source on GitHub ↗
(err: unknown, data: unknown, cb?: Callback)

Source from the content-addressed store, hash-verified

4type Callback = (_err?: unknown, _data?: any) => any
5
6function optionalCb(err: unknown, data: unknown, cb?: Callback) {
7 if (cb) return cb(err, data)
8 if (err) throw err
9 return data
10}
11
12interface Serializer {
13 parse(s: string): SessionData | Promise<SessionData>

Callers 8

getMethod · 0.85
setMethod · 0.85
touchMethod · 0.85
destroyMethod · 0.85
clearMethod · 0.85
lengthMethod · 0.85
idsMethod · 0.85
allMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…