Code Monkey home page Code Monkey logo

Comments (8)

cschoi3 avatar cschoi3 commented on August 15, 2024

from us-states-and-cities-json.

 avatar commented on August 15, 2024

Thanks! I'll wait for that one. Very timely lol - working on a project that needs autofilling of US states and cities. Thanks again

from us-states-and-cities-json.

 avatar commented on August 15, 2024

And maybe, for further improvements, we could reformat the JSON as

{
  state: "StateX",
  abbreviation: "cx",
  cities: [...cities]
}

from us-states-and-cities-json.

cschoi3 avatar cschoi3 commented on August 15, 2024

^ question, have you thought on how would you be associating a particular state with its cities in the format you've outlined above? and actually after giving some thought to it, rather than publishing this file to npm, you could just download and inject into your database or even include it as a data file in your project, no?

from us-states-and-cities-json.

 avatar commented on August 15, 2024

Actually, I downloaded and minified the data.json file and added it in project. I was just thinking if publishing this one to npm will have an effect to the app's bundle size (though may not be that much).
Also, it would be easier to import.

My project covers US states/cities and Canada provinces/municipalities. Kindly check https://github.com/jprichardson/node-canada if you like - I'm using this one for simple Canada lookups. Cheers

from us-states-and-cities-json.

cschoi3 avatar cschoi3 commented on August 15, 2024

^ can't seem to open the node-canada repo and cool, minifying the data and adding it to your project is the way i would go about this as well

from us-states-and-cities-json.

 avatar commented on August 15, 2024

Can I fork this one and create a NPM version and attribute you?

from us-states-and-cities-json.

cschoi3 avatar cschoi3 commented on August 15, 2024

For sure, go right ahead

from us-states-and-cities-json.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.