@fruits-chain/react-native-xiaoshu
Version:
React Native UI library
31 lines (25 loc) • 571 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.widthStyle = void 0;
const StyleMap = new Map();
const widthStyle = (vars, creator) => {
let myStyle;
for (let [key, value] of StyleMap) {
if (key[1] === creator) {
if (key[0] === vars) {
myStyle = value;
} else {
StyleMap.delete(key);
}
}
}
if (!myStyle) {
myStyle = creator(vars);
StyleMap.set([vars, creator], myStyle);
}
return myStyle;
};
exports.widthStyle = widthStyle;
//# sourceMappingURL=width-style.js.map