Skip to content

Commit 17a4fa7

Browse files
authored
Merge pull request #48 from veghdev/date
statdate.js: fix start/end date assertation
2 parents c8396c5 + 2611f42 commit 17a4fa7

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/statdate.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class StatDate {
55
constructor(start, end) {
66
this.#start = StatDate.formatStart(start);
77
this.#end = StatDate.formatEnd(end);
8-
if (this.#start >= this.#end) {
8+
if (this.#start > this.#end) {
99
throw new Error("start must be before end");
1010
}
1111
}
@@ -17,7 +17,7 @@ class StatDate {
1717
set start(start) {
1818
start = StatDate.formatStart(start);
1919
if (this.end && start) {
20-
if (start <= this.end) {
20+
if (start > this.end) {
2121
throw new Error("start must be before end");
2222
}
2323
}
@@ -31,7 +31,7 @@ class StatDate {
3131
set end(end) {
3232
end = StatDate.formatEnd(end);
3333
if (this.start && end) {
34-
if (this.start <= end) {
34+
if (this.start > end) {
3535
throw new Error("start must be before end");
3636
}
3737
}

src/writenpmstat.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,6 @@ class WriteNpmStat {
229229
}
230230
Promise.all(csvFilesReady).then(() => {
231231
for (const [key] of Object.entries(stats)) {
232-
console.log(csvFiles);
233-
console.log(key);
234232
if (csvFiles[key]) {
235233
stats[key] = csvFiles[key].concat(stats[key]);
236234
}

0 commit comments

Comments
 (0)