(agent)
| 1017 | const SYM_AGENT_CBS = Symbol('Agent Init Callbacks'); |
| 1018 | class AgentContext { |
| 1019 | constructor(agent) { |
| 1020 | if (typeof agent === 'string') |
| 1021 | agent = createAgent(agent); |
| 1022 | else if (!isAgent(agent)) |
| 1023 | throw new Error('Invalid agent argument'); |
| 1024 | this[SYM_AGENT] = agent; |
| 1025 | this[SYM_AGENT_KEYS] = null; |
| 1026 | this[SYM_AGENT_KEYS_IDX] = -1; |
| 1027 | this[SYM_AGENT_CBS] = null; |
| 1028 | } |
| 1029 | init(cb) { |
| 1030 | if (typeof cb !== 'function') |
| 1031 | cb = noop; |
nothing calls this directly
no test coverage detected