aboutsummaryrefslogtreecommitdiff
path: root/node_modules/prompts/index.js
blob: 3479956c45e430891ec2897ee3606c6596bd4a5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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');