MCPcopy Index your code
hub / github.com/nodejs/node / newParser

Function newParser

benchmark/http/bench-parser.js:31–43  ·  view source on GitHub ↗
(type)

Source from the content-addressed store, hash-verified

29 }
30
31 function newParser(type) {
32 const parser = new HTTPParser();
33 parser.initialize(type, {});
34
35 parser.headers = [];
36
37 parser[kOnHeaders] = function() { };
38 parser[kOnHeadersComplete] = function() { };
39 parser[kOnBody] = function() { };
40 parser[kOnMessageComplete] = function() { };
41
42 return parser;
43 }
44
45 let header = `GET /hello HTTP/1.1\r\nContent-Type: text/plain\r\n`;
46

Callers 1

processHeaderFunction · 0.70

Calls 1

initializeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…