forked from mirrored/github-readme-stats
Update stats-card.js
This commit is contained in:
+12
-9
@@ -97,8 +97,19 @@ const renderStatsCard = (stats = {}, options = { hide: [] }) => {
|
||||
locale,
|
||||
disable_animations = false,
|
||||
} = options;
|
||||
|
||||
const name = stats.name || "GitHub User",
|
||||
|
||||
const apostrophe = ["x", "s"].includes(name.slice(-1).toLocaleLowerCase())
|
||||
? ""
|
||||
: "s";
|
||||
|
||||
const i18n = new I18n({
|
||||
locale,
|
||||
translations: statCardLocales({ name, apostrophe }),
|
||||
});
|
||||
|
||||
const {
|
||||
name = "GitHub User",
|
||||
totalStars = "2018",
|
||||
totalCommits = "29019",
|
||||
totalIssues = "203",
|
||||
@@ -132,14 +143,6 @@ const renderStatsCard = (stats = {}, options = { hide: [] }) => {
|
||||
theme,
|
||||
});
|
||||
|
||||
const apostrophe = ["x", "s"].includes(name.slice(-1).toLocaleLowerCase())
|
||||
? ""
|
||||
: "s";
|
||||
const i18n = new I18n({
|
||||
locale,
|
||||
translations: statCardLocales({ name, apostrophe }),
|
||||
});
|
||||
|
||||
// Meta data for creating text nodes with createTextNode function
|
||||
const STATS = {
|
||||
stars: {
|
||||
|
||||
Reference in New Issue
Block a user