Skip to content

Commit

Permalink
Remove support for EOL Node versions <14
Browse files Browse the repository at this point in the history
  • Loading branch information
joeykilpatrick committed Dec 19, 2022
1 parent a0c1777 commit 6b91705
Show file tree
Hide file tree
Showing 6 changed files with 903 additions and 4,819 deletions.
10 changes: 0 additions & 10 deletions .babelrc

This file was deleted.

8 changes: 5 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
language: node_js
script:
- npm run build
- npm test
node_js:
- "8"
- "6"
- "20"
- "19"
- "18"
- "16"
- "14"
15 changes: 1 addition & 14 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,14 +1 @@
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');
module.exports = require('./lib/index.js');
Loading

0 comments on commit 6b91705

Please sign in to comment.