MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / nextId

Function nextId

bs/bs.ts:90–95  ·  view source on GitHub ↗
(db: Low<BsDB>)

Source from the content-addressed store, hash-verified

88}
89
90function nextId(db: Low<BsDB>): string {
91 const current = Number(db.data?.seq ?? "0");
92 const next = Number.isFinite(current) ? current + 1 : 1;
93 db.data!.seq = String(next);
94 return String(next);
95}
96
97function toInt(value: any): number | undefined {
98 const n = Number(value);

Callers 1

BsPluginClass · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected