This commit is contained in:
tamaina
2023-02-12 11:28:10 +00:00
parent 548bf14846
commit dc0f39c9a1
3 changed files with 10 additions and 25 deletions

View File

@ -1,5 +1,5 @@
import * as iconv from 'iconv-lite';
import * as jschardet from 'jschardet';
import iconv from 'iconv-lite';
import jschardet from 'jschardet';
const regCharset = new RegExp(/charset\s*=\s*["']?([\w-]+)/, 'i');

View File

@ -10,9 +10,9 @@ import { readFileSync } from 'node:fs';
const _filename = fileURLToPath(import.meta.url);
const _dirname = dirname(_filename);
export let agent: Got.Agents | undefined = undefined;
export let agent: Got.Agents = {};
export function setAgent(_agent: Got.Agents) {
agent = _agent;
agent = _agent || {};
}
export type GotOptions = {