update, text, response
This commit is contained in:
7
node_modules/update-browserslist-db/utils.js
generated
vendored
7
node_modules/update-browserslist-db/utils.js
generated
vendored
@@ -3,8 +3,11 @@ const { EOL } = require('os')
|
||||
const getFirstRegexpMatchOrDefault = (text, regexp, defaultValue) => {
|
||||
regexp.lastIndex = 0 // https://stackoverflow.com/a/11477448/4536543
|
||||
let match = regexp.exec(text)
|
||||
if (match !== null) return match[1]
|
||||
return defaultValue
|
||||
if (match !== null) {
|
||||
return match[1]
|
||||
} else {
|
||||
return defaultValue
|
||||
}
|
||||
}
|
||||
|
||||
const DEFAULT_INDENT = ' '
|
||||
|
||||
Reference in New Issue
Block a user