diff options
Diffstat (limited to 'node_modules/prompts/index.js')
-rw-r--r-- | node_modules/prompts/index.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/node_modules/prompts/index.js b/node_modules/prompts/index.js new file mode 100644 index 0000000..3479956 --- /dev/null +++ b/node_modules/prompts/index.js @@ -0,0 +1,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'); |