Files
NapCatQQ/.pnpm-store/v3/files/a0/4d1d8a6937b0440e3174be436741719232c47282dcc407b946672fa335bde372a8caba21b31866060c8ef2c7e5a000515bb453f03dbf1bea331492f5e80ad4
TanTan e311ca3275
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

18 lines
621 B
Plaintext

import { deepMerge, isObjectNotArray } from './deep-merge.js';
export function applyDefault(defaultOptions, userOptions) {
const options = structuredClone(defaultOptions);
if (userOptions == null) {
return options;
}
for (const [i, opt] of options.entries()) {
if (userOptions[i] !== undefined) {
const userOpt = userOptions[i];
options[i] =
isObjectNotArray(userOpt) && isObjectNotArray(opt)
? deepMerge(opt, userOpt)
: userOpt;
}
}
return options;
}
//# sourceMappingURL=apply-default.js.map