chore: code formatting
This commit is contained in:
@@ -16,7 +16,13 @@ export default async function({login, q}, {conf, data, rest, graphql, plugins, q
|
||||
}
|
||||
|
||||
//Init
|
||||
const computed = {commits:0, sponsorships:0, licenses:{favorite:"", used:{}, about:{}}, token:{}, repositories:{watchers:0, stargazers:0, issues_open:0, issues_closed:0, pr_open:0, pr_closed:0, pr_merged:0, forks:0, forked:0, releases:0, deployments:0, environments:0}}
|
||||
const computed = {
|
||||
commits:0,
|
||||
sponsorships:0,
|
||||
licenses:{favorite:"", used:{}, about:{}},
|
||||
token:{},
|
||||
repositories:{watchers:0, stargazers:0, issues_open:0, issues_closed:0, pr_open:0, pr_closed:0, pr_merged:0, forks:0, forked:0, releases:0, deployments:0, environments:0},
|
||||
}
|
||||
const avatar = imports.imgb64(data.user.avatarUrl)
|
||||
data.computed = computed
|
||||
console.debug(`metrics/compute/${login} > formatting common metrics`)
|
||||
@@ -38,6 +44,7 @@ export default async function({login, q}, {conf, data, rest, graphql, plugins, q
|
||||
else if (process?.env?.TZ)
|
||||
data.config.timezone = {name:process.env.TZ, offset}
|
||||
|
||||
|
||||
//Display
|
||||
data.large = display === "large"
|
||||
data.columns = display === "columns"
|
||||
@@ -101,7 +108,7 @@ export default async function({login, q}, {conf, data, rest, graphql, plugins, q
|
||||
const months = diff.getUTCMonth() - new Date(0).getUTCMonth()
|
||||
const days = diff.getUTCDate() - new Date(0).getUTCDate()
|
||||
|
||||
computed.registered = {years: years + days / 365.25, months}
|
||||
computed.registered = {years:years + days / 365.25, months}
|
||||
computed.registration = years ? `${years} year${imports.s(years)} ago` : months ? `${months} month${imports.s(months)} ago` : `${days} day${imports.s(days)} ago`
|
||||
computed.cakeday = (years >= 1 && months === 0 && days === 0) ? true : false
|
||||
|
||||
@@ -124,7 +131,7 @@ export default async function({login, q}, {conf, data, rest, graphql, plugins, q
|
||||
data.meta = {
|
||||
version:conf.package.version,
|
||||
author:conf.package.author,
|
||||
generated:imports.format.date(new Date(), {date:true, time:true})
|
||||
generated:imports.format.date(new Date(), {date:true, time:true}),
|
||||
}
|
||||
|
||||
//Debug flags
|
||||
|
||||
Reference in New Issue
Block a user