use parseInt

This commit is contained in:
silverwind 2022-03-07 16:54:59 +01:00
parent 49212af547
commit e4d2e437a5
Signed by: silverwind
GPG Key ID: 2E62B41C93869443

@ -184,7 +184,7 @@ const npmrc = rc("npm", {registry: "https://registry.npmjs.org"});
const authTokenOpts = {npmrc, recursive: true};
const registry = normalizeUrl(args.registry || npmrc.registry);
const githubApiUrl = args.githubapi ? normalizeUrl(args.githubapi) : "https://api.github.com";
const maxSockets = typeof args.sockets === "number" ? args.sockets : MAX_SOCKETS;
const maxSockets = typeof args.sockets === "number" ? parseInt(args.sockets) : MAX_SOCKETS;
const extractCerts = str => Array.from(str.matchAll(/(----BEGIN CERT[^]+?IFICATE----)/g)).map(m => m[0]);
const agentOpts = {};