Skip to content

Commit 437514e

Browse files
author
Gabriel Schulhof
committed
Use built-in N-API on Node.js >= 6.14.2
Update the version ranges in index.js to reflect that N-API is now available in Node.js 6.x as of v6.14.2. PR-URL: #263 Reviewed-By: Hitesh Kanwathirtha <[email protected]> Reviewed-By: Kyle Farnung <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
1 parent 75086da commit 437514e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ var versionArray = process.version
1414
// We know which version of Node.js first shipped the incarnation of the API
1515
// available in *this* package. So, if we find that the Node.js version is below
1616
// that, we indicate that the API is missing from Node.js.
17-
var isNodeApiBuiltin =
18-
(versionArray[0] > 8 || (versionArray[0] == 8 && versionArray[1] > 5));
17+
var isNodeApiBuiltin = (
18+
versionArray[0] > 8 ||
19+
(versionArray[0] == 8 && versionArray[1] >= 6) ||
20+
(versionArray[0] == 6 && versionArray[1] >= 14 && versionArray[2] >= 2));
1921

2022
// The flag is not needed when the Node version is not 8, nor if the API is
2123
// built-in, because we removed the flag at the same time as creating the final

0 commit comments

Comments
 (0)