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

Function extractVariableLine

src/models/GitConfig.js:71–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71const extractVariableLine = line => {
72 const matches = VARIABLE_LINE_REGEX.exec(line)
73 if (matches != null) {
74 const [name, rawValue = 'true'] = matches.slice(1)
75 const valueWithoutComments = removeComments(rawValue)
76 const valueWithoutQuotes = removeQuotes(valueWithoutComments)
77 return [name, valueWithoutQuotes]
78 }
79 return null
80}
81
82const removeComments = rawValue => {
83 const commentMatches = VARIABLE_VALUE_COMMENT_REGEX.exec(rawValue)

Callers 1

constructorMethod · 0.85

Calls 3

removeCommentsFunction · 0.85
removeQuotesFunction · 0.85
sliceMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…