mirror of
https://github.com/IonicaBizau/git-stats.git
synced 2024-11-17 17:35:22 +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("▣", "#1e6823")
|
||||
]
|
||||
, DAYS = {
|
||||
Sun: 0
|
||||
, Mon: 1
|
||||
, Tue: 2
|
||||
, Wed: 3
|
||||
, Thu: 4
|
||||
, Fri: 5
|
||||
, Sat: 6
|
||||
}
|
||||
, DAYS_ARR = [
|
||||
, DAYS = [
|
||||
"Sun"
|
||||
, "Mon"
|
||||
, "Tue"
|
||||
|
@ -234,7 +225,7 @@ GitStats.ansiCalendar = function (data, callback) {
|
|||
|
||||
if (!cDayObj) return;
|
||||
|
||||
cWeek[DAYS[sDay]] = SQUARES[cDayObj.level];
|
||||
cWeek[DAYS.indexOf(sDay)] = SQUARES[cDayObj.level];
|
||||
});
|
||||
|
||||
if (cWeek.length) {
|
||||
|
@ -250,7 +241,7 @@ GitStats.ansiCalendar = function (data, callback) {
|
|||
|
||||
strYear = strYear.split("\n").map(function (c, i) {
|
||||
if (i > 6) { return; }
|
||||
return DAYS_ARR[i] + c;
|
||||
return DAYS[i] + c;
|
||||
}).join("\n");
|
||||
|
||||
strYear +=
|
||||
|
|
Loading…
Reference in a new issue