Skip to content
On this page

Interface

Runtime configuration and metadata that xp exposes throughout simply-xp.

Property Type Optional Default Description
auto_create boolean ✅ false Allows helpers to create missing users when they are queried.
database MongoClient or Database ✅ undefined Underlying database connection provided by the consumer.
dbName string ✅ MongoDB only: explicit database name used for internal calls.
dbType “mongodb” | “sqlite” ✅ mongodb Configured database provider.
debug boolean ✅ false Emit debug logging via XpLog.debug.
notify boolean ✅ true Enable console notifications (on by default).
registeredFonts Array<string> ✅ [] Fonts already registered for rendering helpers.
version string ✅ 2.0.0 simply-xp version string baked into the package.
xp_rate number ✅ 0.1 Global XP rate used during XP ↔︎ level conversions.