sjlu / cities

Lookup cities based on zipcodes or GPS coordinates
https://www.npmjs.com/package/cities
27 stars 15 forks source link

add find method #6

Closed talon closed 9 years ago

talon commented 9 years ago

This adds cities.find() which can be used like cities.find({state_abbr: 'CO'}) which will give you an array of cities in Colorado. If the array has only one item in it, it just returns that item.

sjlu commented 9 years ago

Is it possible to submit a change without formatting? Looks like your editor really mangled it up.

talon commented 9 years ago

@sjlu I fixed the pertinent formatting. I can add back in the EOL whitespace if you want but my editor makes that especially difficult.

sjlu commented 9 years ago

Hey @LegitTalon,

I refactored the library, let me know if what I've provided works for you. I'll close this pull request for now.