mirror of
https://github.com/IonicaBizau/git-stats.git
synced 2024-12-22 13:22:11 +01:00
Removed duplicated days object.
This commit is contained in:
parent
c688d6bab5
commit
0809aef044
1 changed files with 3 additions and 12 deletions
15
lib/index.js
15
lib/index.js
|
@ -25,16 +25,7 @@ const STORE_PATH = Ul.USER_DIR + "/.git-stats"
|
||||||
, Couleurs.fg("▣", "#44a340")
|
, Couleurs.fg("▣", "#44a340")
|
||||||
, Couleurs.fg("▣", "#1e6823")
|
, Couleurs.fg("▣", "#1e6823")
|
||||||
]
|
]
|
||||||
, DAYS = {
|
, DAYS = [
|
||||||
Sun: 0
|
|
||||||
, Mon: 1
|
|
||||||
, Tue: 2
|
|
||||||
, Wed: 3
|
|
||||||
, Thu: 4
|
|
||||||
, Fri: 5
|
|
||||||
, Sat: 6
|
|
||||||
}
|
|
||||||
, DAYS_ARR = [
|
|
||||||
"Sun"
|
"Sun"
|
||||||
, "Mon"
|
, "Mon"
|
||||||
, "Tue"
|
, "Tue"
|
||||||
|
@ -234,7 +225,7 @@ GitStats.ansiCalendar = function (data, callback) {
|
||||||
|
|
||||||
if (!cDayObj) return;
|
if (!cDayObj) return;
|
||||||
|
|
||||||
cWeek[DAYS[sDay]] = SQUARES[cDayObj.level];
|
cWeek[DAYS.indexOf(sDay)] = SQUARES[cDayObj.level];
|
||||||
});
|
});
|
||||||
|
|
||||||
if (cWeek.length) {
|
if (cWeek.length) {
|
||||||
|
@ -250,7 +241,7 @@ GitStats.ansiCalendar = function (data, callback) {
|
||||||
|
|
||||||
strYear = strYear.split("\n").map(function (c, i) {
|
strYear = strYear.split("\n").map(function (c, i) {
|
||||||
if (i > 6) { return; }
|
if (i > 6) { return; }
|
||||||
return DAYS_ARR[i] + c;
|
return DAYS[i] + c;
|
||||||
}).join("\n");
|
}).join("\n");
|
||||||
|
|
||||||
strYear +=
|
strYear +=
|
||||||
|
|
Loading…
Reference in a new issue