We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d16a9e7 commit 6aba647Copy full SHA for 6aba647
1 file changed
lib/node/http-parser.js
@@ -1,6 +1,11 @@
1
'use strict'
2
3
// TODO: This is not really allowed by Node but it works for now.
4
-const { HTTPParser } = require('_http_common')
+const common = require('_http_common')
5
6
-module.exports = HTTPParser
+if (common.HTTPParser) {
7
+ module.exports = common.HTTPParser
8
+} else {
9
+ // Node 10
10
+ module.exports = process.binding('http_parser').HTTPParser // eslint-disable-line
11
+}
0 commit comments