commit 2 refactor
This commit is contained in:
parent
588f666943
commit
32e43c9243
310 changed files with 33318 additions and 31189 deletions
|
|
@ -1,3 +1,5 @@
|
|||
import { defined } from '@stock-bot/invariants';
|
||||
|
||||
/**
|
||||
* User Agent utility for generating random user agents
|
||||
*/
|
||||
|
|
@ -26,5 +28,5 @@ const USER_AGENTS = [
|
|||
|
||||
export function getRandomUserAgent(): string {
|
||||
const index = Math.floor(Math.random() * USER_AGENTS.length);
|
||||
return USER_AGENTS[index]!;
|
||||
return defined(USER_AGENTS[index]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue