Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow coordinate nearbyGPSCoordinate parameter to be [string, string] #780

Closed
ST-DDT opened this issue Apr 5, 2022 · 1 comment · Fixed by #1234
Closed

Allow coordinate nearbyGPSCoordinate parameter to be [string, string] #780

ST-DDT opened this issue Apr 5, 2022 · 1 comment · Fixed by #1234
Assignees
Labels
c: feature Request for new feature m: location Something is referring to the location module p: 1-normal Nothing urgent s: invalid This doesn't seem right

Comments

@ST-DDT
Copy link
Member

ST-DDT commented Apr 5, 2022

faker/src/address.ts

Lines 498 to 503 in ccb58a1

// TODO ST-DDT 2022-02-10: Allow coordinate parameter to be [string, string].
nearbyGPSCoordinate(
coordinate?: [number, number],
radius?: number,
isMetric?: boolean
): [string, string] {

The nearbyGPSCoordinate() method should be able to take the values returned from latitude(), longitude() and nearbyGPSCoordinate().

Ref: #541

@ST-DDT ST-DDT added c: feature Request for new feature p: 1-normal Nothing urgent s: accepted Accepted feature / Confirmed bug labels Apr 5, 2022
@ST-DDT ST-DDT added this to the v6 - Non-Breaking Changes milestone Apr 5, 2022
@Shinigami92
Copy link
Member

I would like to discuss if it is worth it that we need to return [string, string] just to have same fixed precision for both values.
Instead the user could call that theyself if needed and then they can use the exact numbers as is.
In our tests we use +coordinate[0] to convert it back to a number...

@xDivisionByZerox xDivisionByZerox added the m: location Something is referring to the location module label Jul 29, 2022
@ST-DDT ST-DDT added s: invalid This doesn't seem right and removed s: accepted Accepted feature / Confirmed bug labels Aug 5, 2022
@ST-DDT ST-DDT closed this as completed Aug 5, 2022
@ST-DDT ST-DDT moved this to Done in Faker Roadmap Aug 5, 2022
@ST-DDT ST-DDT linked a pull request Aug 5, 2022 that will close this issue
@ST-DDT ST-DDT self-assigned this Aug 5, 2022
@ST-DDT ST-DDT removed this from Faker Roadmap Nov 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: feature Request for new feature m: location Something is referring to the location module p: 1-normal Nothing urgent s: invalid This doesn't seem right
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants