india-state-city 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Sumit Tripathi
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -8225,14 +8225,14 @@
8225
8225
  "76.16314000"
8226
8226
  ],
8227
8227
  [
8228
- "Bangalore Rural",
8228
+ "Bengaluru Rural",
8229
8229
  "IN",
8230
8230
  "KA",
8231
8231
  "13.22567000",
8232
8232
  "77.57501000"
8233
8233
  ],
8234
8234
  [
8235
- "Bangalore Urban",
8235
+ "Bengaluru Urban",
8236
8236
  "IN",
8237
8237
  "KA",
8238
8238
  "13.00000000",
@@ -8225,14 +8225,14 @@
8225
8225
  "76.16314000"
8226
8226
  ],
8227
8227
  [
8228
- "Bangalore Rural",
8228
+ "Bengaluru Rural",
8229
8229
  "IN",
8230
8230
  "KA",
8231
8231
  "13.22567000",
8232
8232
  "77.57501000"
8233
8233
  ],
8234
8234
  [
8235
- "Bangalore Urban",
8235
+ "Bengaluru Urban",
8236
8236
  "IN",
8237
8237
  "KA",
8238
8238
  "13.00000000",
@@ -5,7 +5,9 @@ function defaultKeyToCompare(entity) {
5
5
  return entity.name;
6
6
  }
7
7
  exports.defaultKeyToCompare = defaultKeyToCompare;
8
- const compare = (a, b, keyToCompare = defaultKeyToCompare) => {
8
+ const compare = (a, b,
9
+ // eslint-disable-next-line no-unused-vars
10
+ keyToCompare = defaultKeyToCompare) => {
9
11
  if (keyToCompare(a) < keyToCompare(b))
10
12
  return -1;
11
13
  if (keyToCompare(a) > keyToCompare(b))
@@ -1,7 +1,9 @@
1
1
  export function defaultKeyToCompare(entity) {
2
2
  return entity.name;
3
3
  }
4
- export const compare = (a, b, keyToCompare = defaultKeyToCompare) => {
4
+ export const compare = (a, b,
5
+ // eslint-disable-next-line no-unused-vars
6
+ keyToCompare = defaultKeyToCompare) => {
5
7
  if (keyToCompare(a) < keyToCompare(b))
6
8
  return -1;
7
9
  if (keyToCompare(a) > keyToCompare(b))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "india-state-city",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Library for fetching India's States and Cities",
5
5
  "main": "./lib/cjs/index.js",
6
6
  "module": "./lib/index.js",
@@ -1,20 +0,0 @@
1
- [
2
- {
3
- "name": "India",
4
- "isoCode": "IN",
5
- "flag": "🇮🇳",
6
- "phonecode": "91",
7
- "currency": "INR",
8
- "latitude": "20.00000000",
9
- "longitude": "77.00000000",
10
- "timezones": [
11
- {
12
- "zoneName": "Asia/Kolkata",
13
- "gmtOffset": 19800,
14
- "gmtOffsetName": "UTC+05:30",
15
- "abbreviation": "IST",
16
- "tzName": "Indian Standard Time"
17
- }
18
- ]
19
- }
20
- ]
@@ -1,20 +0,0 @@
1
- [
2
- {
3
- "name": "India",
4
- "isoCode": "IN",
5
- "flag": "🇮🇳",
6
- "phonecode": "91",
7
- "currency": "INR",
8
- "latitude": "20.00000000",
9
- "longitude": "77.00000000",
10
- "timezones": [
11
- {
12
- "zoneName": "Asia/Kolkata",
13
- "gmtOffset": 19800,
14
- "gmtOffsetName": "UTC+05:30",
15
- "abbreviation": "IST",
16
- "tzName": "Indian Standard Time"
17
- }
18
- ]
19
- }
20
- ]
@@ -1,8 +0,0 @@
1
- import { ICountry } from './interface';
2
- declare function getCountry(): ICountry | undefined;
3
- declare function getAllCountries(): ICountry[];
4
- declare const _default: {
5
- getCountry: typeof getCountry;
6
- getAllCountries: typeof getAllCountries;
7
- };
8
- export default _default;
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const country_json_1 = __importDefault(require("./assets/country.json"));
7
- // Get India object.
8
- function getCountry() {
9
- return country_json_1.default[0];
10
- }
11
- // Get a list of all countries (only India).
12
- function getAllCountries() {
13
- return country_json_1.default;
14
- }
15
- exports.default = {
16
- getCountry,
17
- getAllCountries,
18
- };
package/lib/country.d.ts DELETED
@@ -1,8 +0,0 @@
1
- import { ICountry } from './interface';
2
- declare function getCountry(): ICountry | undefined;
3
- declare function getAllCountries(): ICountry[];
4
- declare const _default: {
5
- getCountry: typeof getCountry;
6
- getAllCountries: typeof getAllCountries;
7
- };
8
- export default _default;
package/lib/country.js DELETED
@@ -1,13 +0,0 @@
1
- import countryList from './assets/country.json';
2
- // Get India object.
3
- function getCountry() {
4
- return countryList[0];
5
- }
6
- // Get a list of all countries (only India).
7
- function getAllCountries() {
8
- return countryList;
9
- }
10
- export default {
11
- getCountry,
12
- getAllCountries,
13
- };