初始化

This commit is contained in:
2025-12-12 15:54:04 +08:00
commit 83a8a3bb9a
2404 changed files with 508391 additions and 0 deletions

37
node_modules/cheerio/dist/commonjs/options.js generated vendored Normal file
View File

@@ -0,0 +1,37 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.flattenOptions = flattenOptions;
const defaultOpts = {
_useHtmlParser2: false,
};
/**
* Flatten the options for Cheerio.
*
* This will set `_useHtmlParser2` to true if `xml` is set to true.
*
* @param options - The options to flatten.
* @param baseOptions - The base options to use.
* @returns The flattened options.
*/
function flattenOptions(options, baseOptions) {
if (!options) {
return baseOptions !== null && baseOptions !== void 0 ? baseOptions : defaultOpts;
}
const opts = {
_useHtmlParser2: !!options.xmlMode,
...baseOptions,
...options,
};
if (options.xml) {
opts._useHtmlParser2 = true;
opts.xmlMode = true;
if (options.xml !== true) {
Object.assign(opts, options.xml);
}
}
else if (options.xmlMode) {
opts._useHtmlParser2 = true;
}
return opts;
}
//# sourceMappingURL=options.js.map