- 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>
27 lines
613 B
Plaintext
27 lines
613 B
Plaintext
// @flow strict
|
|
import objectEntries from '../polyfills/objectEntries';
|
|
|
|
import type {
|
|
ObjMap,
|
|
ObjMapLike,
|
|
ReadOnlyObjMap,
|
|
ReadOnlyObjMapLike,
|
|
} from './ObjMap';
|
|
|
|
/* eslint-disable no-redeclare */
|
|
declare function toObjMap<T>(obj: ObjMapLike<T>): ObjMap<T>;
|
|
declare function toObjMap<T>(obj: ReadOnlyObjMapLike<T>): ReadOnlyObjMap<T>;
|
|
|
|
export default function toObjMap(obj) {
|
|
/* eslint-enable no-redeclare */
|
|
if (Object.getPrototypeOf(obj) === null) {
|
|
return obj;
|
|
}
|
|
|
|
const map = Object.create(null);
|
|
for (const [key, value] of objectEntries(obj)) {
|
|
map[key] = value;
|
|
}
|
|
return map;
|
|
}
|