mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-06 12:47:13 +02:00
Add door stats & new mini format styles
+ Door runs stat + Door run minutes stat + Door runs MCI + Door run friendly duration MCI + durationHours/Minutes/Seconds mini format styles
This commit is contained in:
parent
9d39e99c5a
commit
22b7fdd65c
6 changed files with 116 additions and 0 deletions
|
@ -14,6 +14,7 @@ const {
|
|||
|
||||
// deps
|
||||
const _ = require('lodash');
|
||||
const moment = require('moment');
|
||||
|
||||
/*
|
||||
String formatting HEAVILY inspired by David Chambers string-format library
|
||||
|
@ -281,6 +282,10 @@ const transformers = {
|
|||
countWithAbbr : (n) => formatCount(n, true, 0),
|
||||
countWithoutAbbr : (n) => formatCount(n, false, 0),
|
||||
countAbbr : (n) => formatCountAbbr(n),
|
||||
|
||||
durationHours : (h) => moment.duration(h, 'hours').humanize(),
|
||||
durationMinutes : (m) => moment.duration(m, 'minutes').humanize(),
|
||||
durationSeconds : (s) => moment.duration(s, 'seconds').humanize(),
|
||||
};
|
||||
|
||||
function transformValue(transformerName, value) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue