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

fuzzy should accept number values #20

Open
samanpwbb opened this issue Jul 1, 2016 · 1 comment
Open

fuzzy should accept number values #20

samanpwbb opened this issue Jul 1, 2016 · 1 comment

Comments

@samanpwbb
Copy link

It's common to filter lists with mixed-type data. fuzzy currently throws an error if you pass it a number value.

One workaround is to convert numbers to strings before passing values to fuzzy. The downside to this approach is that you have to throw out (sometimes essential) type information about your data. Ideally, fuzzy would handle both strings and numbers internally, return values that preserve the original type.

@samanpwbb
Copy link
Author

Fix in Mapbox's fork: mapbox#1@mattyork let me know if you'd like to have this – it introduces a breaking change: renames 'string' to 'val' in the returned objects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants