Skip to content

Commit

Permalink
supports lookbehinds
Browse files Browse the repository at this point in the history
- only check minor when major is version 8
- all majors greater than or equal to 9 support lookbehinds
  • Loading branch information
doowb committed May 14, 2019
1 parent 6a7fd01 commit 1f63f7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ exports.removeBackslashes = str => {

exports.supportsLookbehinds = () => {
let segs = process.version.slice(1).split('.');
if (segs.length === 3 && +segs[0] >= 8 && +segs[1] >= 10) {
if (segs.length === 3 && +segs[0] >= 9 || (+segs[0] === 8 && +segs[1] >= 10)) {
return true;
}
return false;
Expand Down

0 comments on commit 1f63f7e

Please sign in to comment.