Helpers

prepareProxy.mjs

@mr_ozio/scraper-utils · v2.5.0 · Generated April 21, 2026

Target Style

Target Style

1 exports

const

resolveProxy

Target Style
export const resolveProxy = ({ fallback = DEFAULT_PROXY } = {}) => {

Resolves the proxy value from CLI flags.

--no-proxy wins over --proxy.

Target style API. Preferred for new code.

Parameters

  • [options]{ fallback?: string }

Returns

string | undefined

Legacy Style

Legacy Style

2 exports

const

proxy

Legacy Style
export const proxy = resolveProxy()

/**
 * Returns the proxy resolved from the current process flags.
 *
 * @returns {string | undefined}
 * @style legacy
 */
export const getProxy = () => proxy

The proxy resolved from the current process flags.

Legacy API. Kept for older code and not the preferred choice for new code.

const

getProxy

Legacy Style
export const getProxy = () => proxy

Returns the proxy resolved from the current process flags.

Legacy API. Kept for older code and not the preferred choice for new code.

Returns

string | undefined