MCPcopy Create free account
hub / github.com/cuth/postcss-pxtorem / convertLegacyOptions

Function convertLegacyOptions

index.js:25–44  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

23};
24
25function convertLegacyOptions(options) {
26 if (typeof options !== "object") return;
27 if (
28 ((typeof options["prop_white_list"] !== "undefined" &&
29 options["prop_white_list"].length === 0) ||
30 (typeof options.propWhiteList !== "undefined" &&
31 options.propWhiteList.length === 0)) &&
32 typeof options.propList === "undefined"
33 ) {
34 options.propList = ["*"];
35 delete options["prop_white_list"];
36 delete options.propWhiteList;
37 }
38 Object.keys(legacyOptions).forEach(key => {
39 if (Reflect.has(options, key)) {
40 options[legacyOptions[key]] = options[key];
41 delete options[key];
42 }
43 });
44}
45
46function createPxReplace(rootValue, unitPrecision, minPixelValue) {
47 return (m, $1) => {

Callers 1

index.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…