install-nix-action/node_modules/prompts/index.js
Domen Kožar 70742d22d9
v6
2019-11-19 17:50:30 +01:00

14 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');