MCPcopy Create free account
hub / github.com/isomorphic-git/isomorphic-git / extractSectionLine

Function extractSectionLine

src/models/GitConfig.js:62–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60const VARIABLE_VALUE_COMMENT_REGEX = /^(.*?)( *[#;].*)$/
61
62const extractSectionLine = line => {
63 const matches = SECTION_LINE_REGEX.exec(line)
64 if (matches != null) {
65 const [section, subsection] = matches.slice(1)
66 return [section, subsection]
67 }
68 return null
69}
70
71const extractVariableLine = line => {
72 const matches = VARIABLE_LINE_REGEX.exec(line)

Callers 1

constructorMethod · 0.85

Calls 1

sliceMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…