MCPcopy Create free account
hub / github.com/ptmt/react-native-macos / countLines

Function countLines

local-cli/bundle/output/unbundle/util.js:20–20  ·  view source on GitHub ↗
(string: string)

Source from the content-addressed store, hash-verified

18const newline = /\r\n?|\n|\u2028|\u2029/g;
19// fastest implementation
20const countLines = (string: string) => (string.match(newline) || []).length + 1;
21
22
23function lineToLineSourceMap(source: string, filename: string = ''): MappingsMap {

Callers 2

lineToLineSourceMapFunction · 0.70
combineSourceMapsFunction · 0.70

Calls 1

matchMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…