refactor(util): code refactor (#13872)
* refactor(util): code refactor * refactor(util): code refactor
This commit is contained in:
parent
a61e5aa06b
commit
0de1f0cce4
3 changed files with 3 additions and 10 deletions
|
|
@ -274,9 +274,7 @@ export function normalizeConfig(config) {
|
|||
|
||||
if (typeof transform === 'function') {
|
||||
transformers.DEFAULT = transform
|
||||
}
|
||||
|
||||
if (typeof transform === 'object' && transform !== null) {
|
||||
} else if (typeof transform === 'object' && transform !== null) {
|
||||
Object.assign(transformers, transform)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,8 +15,7 @@ export function parseGlob(pattern) {
|
|||
|
||||
if (glob.substr(0, 2) === './') {
|
||||
glob = glob.substr(2)
|
||||
}
|
||||
if (glob.charAt(0) === '/') {
|
||||
} else if (glob.charAt(0) === '/') {
|
||||
glob = glob.substr(1)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,11 +29,7 @@ export function splitAtTopLevelOnly(input, separator) {
|
|||
}
|
||||
}
|
||||
|
||||
if (isEscaped) {
|
||||
isEscaped = false
|
||||
} else if (char === '\\') {
|
||||
isEscaped = true
|
||||
}
|
||||
isEscaped = isEscaped ? false : char === '\\'
|
||||
|
||||
if (char === '(' || char === '[' || char === '{') {
|
||||
stack.push(char)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue