メインコンテンツまでスキップ

Interface

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

PropertyTypeOptionalDefaultDescription
auto_createbooleanfalseAllows helpers to create missing users when they are queried.
databaseMongoClient or DatabaseundefinedUnderlying database connection provided by the consumer.
dbNamestringMongoDB only: explicit database name used for internal calls.
dbType"mongodb" | "sqlite"mongodbConfigured database provider.
debugbooleanfalseEmit debug logging via XpLog.debug.
notifybooleantrueEnable console notifications (on by default).
registeredFontsArray<string>[]Fonts already registered for rendering helpers.
versionstring2.0.0simply-xp version string baked into the package.
xp_ratenumber0.1Global XP rate used during XP ↔︎ level conversions.