Skip to content

Commit 0235e3b

Browse files
author
Guillaume Chau
committed
fix: minNode
1 parent cbd33a4 commit 0235e3b

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed
Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
exports.minNode = function (major, minor = 0, patch = 0) {
22
const [M, m, p] = process.versions.node.split('.').map(v => parseInt(v))
3-
return (M >= major && m >= minor && p >= patch)
3+
return (
4+
M > major ||
5+
(
6+
M === major &&
7+
(
8+
m > minor ||
9+
(m === minor && p >= patch)
10+
)
11+
)
12+
)
413
}

0 commit comments

Comments
 (0)