diff options
| author | Shinigami <[email protected]> | 2022-01-29 18:53:43 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-01-29 18:53:43 +0100 |
| commit | 86beb8317d213f3a47edb46e36678adeff01c1b1 (patch) | |
| tree | d0ac39226a2d29aee2e77968b1edfc5c69c5ab3f /src/vendor | |
| parent | 8dfd6ece95b890cdcd14dcde29074ab74475c70e (diff) | |
| download | faker-86beb8317d213f3a47edb46e36678adeff01c1b1.tar.xz faker-86beb8317d213f3a47edb46e36678adeff01c1b1.zip | |
chore: setup improved linting (#151)
Diffstat (limited to 'src/vendor')
| -rw-r--r-- | src/vendor/unique.ts | 2 | ||||
| -rw-r--r-- | src/vendor/user-agent.ts | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/vendor/unique.ts b/src/vendor/unique.ts index 1fc80d5f..dbe82480 100644 --- a/src/vendor/unique.ts +++ b/src/vendor/unique.ts @@ -9,7 +9,7 @@ const found: Record<string, string> = {}; const exclude: string[] = []; // current iteration or retries of unique.exec ( current loop depth ) -let currentIterations = 0; +const currentIterations = 0; // uniqueness compare function // default behavior is to check value as key against object hash diff --git a/src/vendor/user-agent.ts b/src/vendor/user-agent.ts index 4aef3381..b2982b99 100644 --- a/src/vendor/user-agent.ts +++ b/src/vendor/user-agent.ts @@ -57,8 +57,8 @@ export function generate(faker: Faker) { let max = 0; let return_val: string; - for (let key in obj) { - if (obj.hasOwnProperty(key)) { + for (const key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { max = obj[key] + min; return_val = key; if (rand >= min && rand <= max) { |
