aboutsummaryrefslogtreecommitdiff
path: root/src/modules/location
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/location')
-rw-r--r--src/modules/location/index.ts7
1 files changed, 7 insertions, 0 deletions
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;