-
-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Labels
Description
Sometimes we need to implement polyfills for older Node.js versions and for this we have to check version manually like:
const vArr = process.versions.node.split('.').map(num => parseInt(num));
if (vArr[0] > 8 || (vArr[0] === 8 && vArr[1] >= 2)) {
...
}I propose to implement function that will check if process' version is older than required.
if (common.nodeVersionCompatible('8.2')) {
...
}or
if (common.v8VersionCompatible('8.2')) {
...
}WDYT?
/cc @lundibundi @nechaido @belochub @tshemsedinov
lundibundi