6989a98d75
- Arkitektur: docs/auth/passwordless-architecture.md - Backend: iom/quixzoom-auth-service/ (FastAPI + Redis) - Webb: quixzoom-market-pages/se/login/ (QR-kod + polling) - App: iom/quixzoom-app/src/features/auth/ (push + deep links) Flöde: QR-kod → app-godkännande → webb-inloggad
27 lines
515 B
JavaScript
27 lines
515 B
JavaScript
'use strict';
|
|
|
|
const { MESSAGE } = require('triple-beam');
|
|
|
|
class Printf {
|
|
constructor(templateFn) {
|
|
this.template = templateFn;
|
|
}
|
|
|
|
transform(info) {
|
|
info[MESSAGE] = this.template(info);
|
|
return info;
|
|
}
|
|
}
|
|
|
|
/*
|
|
* function printf (templateFn)
|
|
* Returns a new instance of the printf Format that creates an
|
|
* intermediate prototype to store the template string-based formatter
|
|
* function.
|
|
*/
|
|
module.exports = opts => new Printf(opts);
|
|
|
|
module.exports.Printf
|
|
= module.exports.Format
|
|
= Printf;
|