- 37개 파일 IP → zioinfo.co.kr 치환 (소스/매뉴얼/설정/하네스) - Manager DrConsole/NetworkConsole/CsapConsole 빌드 + /var/www/manager/ 배포 - 테스트: Manager HTTP 200, ITSM 신규 API 7개 전체 200 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
48 lines
1.4 KiB
JavaScript
48 lines
1.4 KiB
JavaScript
import prefixProperty from './utils/prefixProperty';
|
|
import prefixValue from './utils/prefixValue';
|
|
|
|
import addNewValuesOnly from './utils/addNewValuesOnly';
|
|
import isObject from './utils/isObject';
|
|
|
|
export default function createPrefixer(_ref) {
|
|
var prefixMap = _ref.prefixMap,
|
|
plugins = _ref.plugins;
|
|
|
|
return function prefix(style) {
|
|
for (var property in style) {
|
|
var value = style[property];
|
|
|
|
// handle nested objects
|
|
if (isObject(value)) {
|
|
style[property] = prefix(value);
|
|
// handle array values
|
|
} else if (Array.isArray(value)) {
|
|
var combinedValue = [];
|
|
|
|
for (var i = 0, len = value.length; i < len; ++i) {
|
|
var processedValue = prefixValue(plugins, property, value[i], style, prefixMap);
|
|
|
|
addNewValuesOnly(combinedValue, processedValue || value[i]);
|
|
}
|
|
|
|
// only modify the value if it was touched
|
|
// by any plugin to prevent unnecessary mutations
|
|
if (combinedValue.length > 0) {
|
|
style[property] = combinedValue;
|
|
}
|
|
} else {
|
|
var _processedValue = prefixValue(plugins, property, value, style, prefixMap);
|
|
|
|
// only modify the value if it was touched
|
|
// by any plugin to prevent unnecessary mutations
|
|
if (_processedValue) {
|
|
style[property] = _processedValue;
|
|
}
|
|
|
|
style = prefixProperty(prefixMap, property, style);
|
|
}
|
|
}
|
|
|
|
return style;
|
|
};
|
|
} |