{"_id":"@dmehmet/city-timezones","_rev":"1-1077d381bcb5f389b96adb85a7e6383f","name":"@dmehmet/city-timezones","dist-tags":{"latest":"1.2.2"},"versions":{"1.2.1":{"name":"@dmehmet/city-timezones","version":"1.2.1","keywords":["timezone","cities","global","lookups","geo"],"author":{"name":"Kevin Roberts"},"license":"MIT","_id":"@dmehmet/city-timezones@1.2.1","maintainers":[{"name":"dmehmet27","email":"d.mehmetkeskin27@gmail.com"}],"homepage":"https://github.com/durdumehmetkeskin/city-timezones#readme","bugs":{"url":"https://github.com/durdumehmetkeskin/city-timezones/issues"},"dist":{"shasum":"b452ddd69d6e8544b57deeaac34c2a5d734c4118","tarball":"https://registry.npmjs.org/@dmehmet/city-timezones/-/city-timezones-1.2.1.tgz","fileCount":6,"integrity":"sha512-ZymA3uW5mksfRAW0jCh4xL4K+/CAszVYvjPlf/2nLG8VT/HAaiy3zv03s1H2XVt350XlBjJPzkX3RLnjtDG6nQ==","signatures":[{"sig":"MEQCIDfz27kMz6aZzteG1aZ4sR8LzsZsj0BKkPXDqAjTcq2jAiACAFJ6PSAqojrMQHxCiMjhgo69VEhrh7LbfqhMiNZcYQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2009227},"main":"index.js","types":"./index.d.ts","scripts":{"test":"mocha"},"_npmUser":{"name":"dmehmet27","email":"d.mehmetkeskin27@gmail.com"},"repository":{"url":"git+https://github.com/durdumehmetkeskin/city-timezones.git","type":"git"},"_npmVersion":"9.8.1","description":"A light and fast method of looking up timezones given the name of a city.","directories":{"test":"test"},"_nodeVersion":"18.18.2","dependencies":{"lodash":"^4.17.21"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^6.1.3"},"_npmOperationalInternal":{"tmp":"tmp/city-timezones_1.2.1_1718029500292_0.10048577612241893","host":"s3://npm-registry-packages"}},"1.2.2":{"name":"@dmehmet/city-timezones","version":"1.2.2","description":"A light and fast method of looking up timezones given the name of a city.","main":"index.js","repository":{"type":"git","url":"git+https://github.com/durdumehmetkeskin/city-timezones.git"},"scripts":{"test":"mocha"},"types":"./index.d.ts","keywords":["timezone","cities","global","lookups","geo"],"homepage":"https://github.com/durdumehmetkeskin/city-timezones#readme","author":{"name":"Kevin Roberts"},"license":"MIT","dependencies":{"lodash":"^4.17.21"},"devDependencies":{"mocha":"^6.1.3"},"bugs":{"url":"https://github.com/durdumehmetkeskin/city-timezones/issues"},"directories":{"test":"test"},"_id":"@dmehmet/city-timezones@1.2.2","gitHead":"a7ed6ebe158acc217cab594fdb229ba88e1ede3d","_nodeVersion":"18.18.2","_npmVersion":"9.8.1","dist":{"integrity":"sha512-SryDOICYooThozCTdTVg3qia18psacbLnNQDZqcWWdSJEOWqji5IpP0xhKxuQy8oegzPcScAa3Hoz12gMYYEfw==","shasum":"db48c3c4ce3d154cbbb830bb3c53f0e89b2a6232","tarball":"https://registry.npmjs.org/@dmehmet/city-timezones/-/city-timezones-1.2.2.tgz","fileCount":6,"unpackedSize":2009227,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHkwzBZdxBjD8/UbtUP7gEbyDVa/EdE5Ikv7hhT99AVZAiBbPfOa+L/EUpqA4xbRIdgRrr059x38hADWNuDEZegesw=="}]},"_npmUser":{"name":"dmehmet27","email":"d.mehmetkeskin27@gmail.com"},"maintainers":[{"name":"dmehmet27","email":"d.mehmetkeskin27@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/city-timezones_1.2.2_1728297954129_0.5467765314746658"},"_hasShrinkwrap":false}},"time":{"created":"2024-06-10T14:25:00.200Z","modified":"2024-10-07T10:45:54.573Z","1.2.1":"2024-06-10T14:25:00.514Z","1.2.2":"2024-10-07T10:45:54.362Z"},"bugs":{"url":"https://github.com/durdumehmetkeskin/city-timezones/issues"},"author":{"name":"Kevin Roberts"},"license":"MIT","homepage":"https://github.com/durdumehmetkeskin/city-timezones#readme","keywords":["timezone","cities","global","lookups","geo"],"repository":{"type":"git","url":"git+https://github.com/durdumehmetkeskin/city-timezones.git"},"description":"A light and fast method of looking up timezones given the name of a city.","maintainers":[{"name":"dmehmet27","email":"d.mehmetkeskin27@gmail.com"}],"readme":"# city-timezones\r\n\r\nA light and fast method of looking up timezones given the name of a city.\r\n\r\n```bash\r\nnpm install city-timezones\r\n```\r\n\r\n```javascript\r\nvar cityTimezones = require('city-timezones');\r\n```\r\n\r\n### cityTimezones.lookupViaCity(city: string)\r\n\r\nIf a city is found, returns an **array** of possible matches with city, state, lat, lng, timezone. Returns an empty `[]` if nothing matches. Multiple cities can be found if they have the same name, i.e. Springfield.\r\nA U.S. based city will contain a `state_ansi` property which is the abbreviated form of a US State [ANSI State Table](https://www.census.gov/geo/reference/ansi_statetables.html)\r\n\r\nfinding based on city name of Chicago (case insensitive):\r\n```javascript\r\nconst cityLookup = cityTimezones.lookupViaCity('Chicago')\r\nconsole.log(cityLookup)\r\n```\r\nWill return:\r\n```javascript\r\n[ { city: 'Chicago',\r\n    city_ascii: 'Chicago',\r\n    lat: 41.82999066,\r\n    lng: -87.75005497,\r\n    pop: 5915976,\r\n    country: 'United States of America',\r\n    iso2: 'US',\r\n    iso3: 'USA',\r\n    province: 'Illinois',\r\n    exactCity: 'Chicago',\r\n    exactProvince: 'IL',\r\n    state_ansi: 'IL',\r\n    timezone: 'America/Chicago' } ]\r\n```\r\n\r\n### cityTimezones.findFromCityStateProvince(searchString: string)\r\n\r\nThis method will return any partial match for the search term based on city, province, or country, or a combination thereof. A U.S. based city will also return matches for the `state_ansi` property.\r\n\r\nfinding based on search term of Springfield MO\r\n```javascript\r\nconst cityLookup = cityTimezones.findFromCityStateProvince('springfield mo')\r\nconsole.log(cityLookup)\r\n```\r\nWill return:\r\n```javascript\r\n[ { city: 'Springfield',\r\n    city_ascii: 'Springfield',\r\n    lat: 37.18001609,\r\n    lng: -93.31999923,\r\n    pop: 180691,\r\n    country: 'United States of America',\r\n    iso2: 'US',\r\n    iso3: 'USA',\r\n    province: 'Missouri',\r\n    state_ansi: 'MO',\r\n    timezone: 'America/Chicago' } ]\t\r\n```\r\n\r\n### cityTimezones.cityMapping\r\n\r\nThis array will contain the full list of all available cities.\r\n\r\n```javascript\r\nconst cityMapping = cityTimezones.cityMapping\r\nconsole.log(cityMapping)\r\n```\r\nWill return:\r\n```javascript\r\n[\r\n  {\r\n    \"city\": \"Qal eh-ye Now\",\r\n    \"city_ascii\": \"Qal eh-ye\",\r\n    \"lat\": 34.98300013,\r\n    \"lng\": 63.13329964,\r\n    \"pop\": 2997,\r\n    \"country\": \"Afghanistan\",\r\n    \"iso2\": \"AF\",\r\n    \"iso3\": \"AFG\",\r\n    \"province\": \"Badghis\",\r\n    \"timezone\": \"Asia/Kabul\"\r\n  },\r\n  {\r\n    \"city\": \"Chaghcharan\",\r\n    \"city_ascii\": \"Chaghcharan\",\r\n    \"lat\": 34.5167011,\r\n    \"lng\": 65.25000063,\r\n    \"pop\": 15000,\r\n    \"country\": \"Afghanistan\",\r\n    \"iso2\": \"AF\",\r\n    \"iso3\": \"AFG\",\r\n    \"province\": \"Ghor\",\r\n    \"timezone\": \"Asia/Kabul\"\r\n  },\r\n  ...\r\n]\t\r\n```\r\n","readmeFilename":"README.md"}