Skip to content
This repository has been archived by the owner on May 31, 2023. It is now read-only.

should resolve deduplicate returned values? #9

Closed
spikelynch opened this issue Oct 21, 2020 · 1 comment
Closed

should resolve deduplicate returned values? #9

spikelynch opened this issue Oct 21, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@spikelynch
Copy link
Contributor

For example: in the Criminal Characters data, getting a list of sentencing locations for a person with this:

const locations = crate.resolve(person, [ { property: "conviction" }, { property: "location" } ])

This will return an array of all the locations at which person was convicted, and if they were convicted for multiple offenses at the same location, the location will appear in the array multiple times.

Should it just return the set of locations (ie deduplicate the list)? Or should that be left to the calling code? Are there use cases which would want the complete list (which is in the same order as the convictions)? Or (my least favourite idea) should remove-duplicates be an option to be passed to the resolve method?

@spikelynch spikelynch added the enhancement New feature or request label Oct 21, 2020
@spikelynch spikelynch self-assigned this Oct 22, 2020
@spikelynch
Copy link
Contributor Author

resolve now de-duplicates the items it's collecting by @id.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant