From 2d93e6f14a5ba976f87b71202bc4e011e38ee823 Mon Sep 17 00:00:00 2001 From: Shinigami Date: Sat, 31 Dec 2022 12:22:38 +0100 Subject: chore: turn on padding-line-between-statements (#1691) --- src/modules/location/index.ts | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/modules/location') diff --git a/src/modules/location/index.ts b/src/modules/location/index.ts index a53c11d7..4e25cbb9 100644 --- a/src/modules/location/index.ts +++ b/src/modules/location/index.ts @@ -10,6 +10,7 @@ export class LocationModule { if (name === 'constructor' || typeof this[name] !== 'function') { continue; } + this[name] = this[name].bind(this); } } @@ -39,6 +40,7 @@ export class LocationModule { format = this.faker.helpers.arrayElement(localeFormat); } } + return this.faker.helpers.replaceSymbols(format); } @@ -62,6 +64,7 @@ export class LocationModule { if (zipRange) { return String(this.faker.number.int(zipRange)); } + return this.zipCode(); } @@ -309,6 +312,7 @@ export class LocationModule { this.faker.definitions.location.direction ); } + return this.faker.helpers.arrayElement( this.faker.definitions.location.direction_abbr ); @@ -333,6 +337,7 @@ export class LocationModule { this.faker.definitions.location.direction.slice(0, 4) ); } + return this.faker.helpers.arrayElement( this.faker.definitions.location.direction_abbr.slice(0, 4) ); @@ -357,6 +362,7 @@ export class LocationModule { this.faker.definitions.location.direction.slice(4, 8) ); } + return this.faker.helpers.arrayElement( this.faker.definitions.location.direction_abbr.slice(4, 8) ); @@ -419,6 +425,7 @@ export class LocationModule { newCoordinate[0] = Math.sign(newCoordinate[0]) * 180 - newCoordinate[0]; newCoordinate[1] += 180; } + // Box longitude [-180°, 180°] newCoordinate[1] = (((newCoordinate[1] % 360) + 540) % 360) - 180; -- cgit v1.2.3