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

Function countLines

test/parallel/test-util-inspect.js:1124–1124  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

1122{
1123 function testLines(input) {
1124 const countLines = (str) => (str.match(/\n/g) || []).length;
1125 const withoutColor = util.inspect(input);
1126 const withColor = util.inspect(input, { colors: true });
1127 assert.strictEqual(countLines(withoutColor), countLines(withColor));

Callers 1

testLinesFunction · 0.85

Calls 1

matchMethod · 0.65

Tested by

no test coverage detected