This commit is contained in:
2023-08-11 10:45:20 +08:00
commit 161ca982f3
31850 changed files with 2706500 additions and 0 deletions

16
node_modules/postcss-pxtorem/lib/filter-prop-list.js generated vendored Normal file
View File

@ -0,0 +1,16 @@
module.exports = {
exact: list => list.filter(m => m.match(/^[^*!]+$/)),
contain: list =>
list.filter(m => m.match(/^\*.+\*$/)).map(m => m.substr(1, m.length - 2)),
endWith: list => list.filter(m => m.match(/^\*[^*]+$/)).map(m => m.substr(1)),
startWith: list =>
list.filter(m => m.match(/^[^*!]+\*$/)).map(m => m.substr(0, m.length - 1)),
notExact: list =>
list.filter(m => m.match(/^![^*].*$/)).map(m => m.substr(1)),
notContain: list =>
list.filter(m => m.match(/^!\*.+\*$/)).map(m => m.substr(2, m.length - 3)),
notEndWith: list =>
list.filter(m => m.match(/^!\*[^*]+$/)).map(m => m.substr(2)),
notStartWith: list =>
list.filter(m => m.match(/^![^*]+\*$/)).map(m => m.substr(1, m.length - 2))
};

9
node_modules/postcss-pxtorem/lib/pixel-unit-regex.js generated vendored Normal file
View File

@ -0,0 +1,9 @@
// excluding regex trick: http://www.rexegg.com/regex-best-trick.html
// Not anything inside double quotes
// Not anything inside single quotes
// Not anything inside url()
// Any digit followed by px
// !singlequotes|!doublequotes|!url()|pixelunit
module.exports = /"[^"]+"|'[^']+'|url\([^)]+\)|var\([^)]+\)|(\d*\.?\d+)px/g;

21
node_modules/postcss-pxtorem/lib/type.js generated vendored Normal file
View File

@ -0,0 +1,21 @@
const type = s =>
Object.prototype.toString
.call(s)
.slice(8, -1)
.toLowerCase();
const types = [
"String",
"Array",
"Undefined",
"Boolean",
"Number",
"Function",
"Symbol",
"Object"
];
module.exports = types.reduce((acc, str) => {
acc["is" + str] = val => type(val) === str.toLowerCase();
return acc;
}, {});