{"id":26051091,"url":"https://github.com/epicx67/indian_places","last_synced_at":"2025-04-10T19:33:47.587Z","repository":{"id":39568874,"uuid":"506363661","full_name":"epicX67/indian_places","owner":"epicX67","description":"A npm package to get all the recognized places of india including pincode","archived":false,"fork":false,"pushed_at":"2022-07-28T21:43:35.000Z","size":3016,"stargazers_count":11,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-08T19:52:31.502Z","etag":null,"topics":["citylist","json","library","npm","package","townlist"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/indian_places","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/epicX67.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-22T18:31:30.000Z","updated_at":"2023-03-01T18:17:03.000Z","dependencies_parsed_at":"2022-09-05T09:40:26.544Z","dependency_job_id":null,"html_url":"https://github.com/epicX67/indian_places","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epicX67%2Findian_places","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epicX67%2Findian_places/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epicX67%2Findian_places/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epicX67%2Findian_places/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/epicX67","download_url":"https://codeload.github.com/epicX67/indian_places/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248281422,"owners_count":21077423,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["citylist","json","library","npm","package","townlist"],"created_at":"2025-03-08T03:37:13.164Z","updated_at":"2025-04-10T19:33:47.567Z","avatar_url":"https://github.com/epicX67.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Indian Places\n\nList of india places including pincode. [Demo](https://epicx67.github.io/indian_places_demo/)\n\n### Installation\n\n    npm i indian_places\n\n## Example\n\n```javascript\nconst ip = require(\"indian_places\");\n\n// To get the states\nconst states = ip.getStates();\n\n// To get the district of a state\nconst westBengal = states.find((item) =\u003e item.name === \"West Bengal\");\nconst districtsOfWb = westBengal.getDistricts();\n\n// To get places of a specific district\nconst north24Pgs = districtsOfWb.find(\n  (item) =\u003e item.name === \"North 24 parganas\"\n);\nconst places = north24Pgs.getPlaces();\n\n// To get places by pincode\n// This function will return empty array if that pincode doesn't exists\nconst places = ip.getPlacesByPin(743271);\n```\n\n## Functions\n\nTo get place data, package contains essential functions which will help you to retrive exact place from mapped data. I described little bit about object types below.\n\n| func()                  | parameter            | returns                   |\n| ----------------------- | -------------------- | ------------------------- |\n| getStates()             | None                 | Array of **State** Obj    |\n| getDistrictsByState()   | **State** - obj      | Array of **District** Obj |\n| getPlacesByDistrict()   | **District** - obj   | Array of **Place** Obj    |\n| getPlacesByPin()        | **pincode** - number | Array of State Obj        |\n\n## Objects\n\n#### State Object\n\n| member         | description                           |\n| -------------- | ------------------------------------- |\n| name           | State name                            |\n| getDistricts() | Method to get districts of that state |\n\n#### District Object\n\n| member      | description                           |\n| ----------- | ------------------------------------- |\n| name        | District name                         |\n| state       | State name of that district           |\n| getPlaces() | Method to get places of that district |\n\n#### Place Object\n\n| member   | description                 |\n| -------- | --------------------------- |\n| name     | Place name                  |\n| district | District name of that place |\n| state    | State name of that place    |\n| pin      | Pincode of that place       |\n\n### At last\n\n\u003e If you like this wrapper package please give this repo a star :)\n\nCredits,\n[India gov data portal](https://data.gov.in/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepicx67%2Findian_places","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fepicx67%2Findian_places","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepicx67%2Findian_places/lists"}