1
0
mirror of https://github.com/actions/setup-python synced 2024-11-30 21:22:28 +08:00
setup-python/node_modules/prompts/index.js
Danny McCormick 39c08a0eaa Initial pass
2019-06-26 21:12:00 -04:00

15 lines
386 B
JavaScript

function isNodeLT(tar) {
tar = (Array.isArray(tar) ? tar : tar.split('.')).map(Number);
let i=0, src=process.versions.node.split('.').map(Number);
for (; i < tar.length; i++) {
if (src[i] > tar[i]) return false;
if (tar[i] > src[i]) return true;
}
return false;
}
module.exports =
isNodeLT('8.6.0')
? require('./dist/index.js')
: require('./lib/index.js');