Updated the files.
This commit is contained in:
parent
1553e6b971
commit
753967d4f5
23418 changed files with 3784666 additions and 0 deletions
58
my-app/node_modules/postcss/lib/list.js
generated
vendored
Executable file
58
my-app/node_modules/postcss/lib/list.js
generated
vendored
Executable file
|
|
@ -0,0 +1,58 @@
|
|||
'use strict'
|
||||
|
||||
let list = {
|
||||
comma(string) {
|
||||
return list.split(string, [','], true)
|
||||
},
|
||||
|
||||
space(string) {
|
||||
let spaces = [' ', '\n', '\t']
|
||||
return list.split(string, spaces)
|
||||
},
|
||||
|
||||
split(string, separators, last) {
|
||||
let array = []
|
||||
let current = ''
|
||||
let split = false
|
||||
|
||||
let func = 0
|
||||
let inQuote = false
|
||||
let prevQuote = ''
|
||||
let escape = false
|
||||
|
||||
for (let letter of string) {
|
||||
if (escape) {
|
||||
escape = false
|
||||
} else if (letter === '\\') {
|
||||
escape = true
|
||||
} else if (inQuote) {
|
||||
if (letter === prevQuote) {
|
||||
inQuote = false
|
||||
}
|
||||
} else if (letter === '"' || letter === "'") {
|
||||
inQuote = true
|
||||
prevQuote = letter
|
||||
} else if (letter === '(') {
|
||||
func += 1
|
||||
} else if (letter === ')') {
|
||||
if (func > 0) func -= 1
|
||||
} else if (func === 0) {
|
||||
if (separators.includes(letter)) split = true
|
||||
}
|
||||
|
||||
if (split) {
|
||||
if (current !== '') array.push(current.trim())
|
||||
current = ''
|
||||
split = false
|
||||
} else {
|
||||
current += letter
|
||||
}
|
||||
}
|
||||
|
||||
if (last || current !== '') array.push(current.trim())
|
||||
return array
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = list
|
||||
list.default = list
|
||||
Loading…
Add table
Add a link
Reference in a new issue