monagree-locs 2.0.1 → 2.0.3

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/README.md CHANGED
@@ -1,15 +1,15 @@
1
- # Monagree Location Picker
2
-
3
- To install, run:
4
-
5
- > npm install monagree-locs
6
-
7
- > Now Shows all countries
8
-
9
- > Only showing states & cities in Nigeria for now
10
-
11
- Please enjoy this accurate & up-to-date location package from the open source team at Monagree. Monagree provides tools for devs to build ecommerce and logistics websites easily. Check out our javascript framework (CLI) on npm [monagree-tools](https://www.npmjs.com/package/monagree-tools "Monagree JS Framework").
12
-
13
- ## Become a Monagree Developer
14
-
1
+ # Monagree Location Picker
2
+
3
+ To install, run:
4
+
5
+ > npm install monagree-locs
6
+
7
+ > Now Shows all countries
8
+
9
+ > Only showing states & cities in Nigeria for now
10
+
11
+ Please enjoy this accurate & up-to-date location package from the open source team at Monagree. Monagree provides tools for devs to build ecommerce and logistics websites easily. Check out our javascript framework (CLI) on npm [monagree-tools](https://www.npmjs.com/package/monagree-tools "Monagree JS Framework").
12
+
13
+ ## Become a Monagree Developer
14
+
15
15
  Start using awesome tools developed by Monagree to build cool ecommerce and logistics apps & Websites. Join now at [Monagree For Developers](https://developers.monagree.com "Monagree Developer Dashboard")
package/dist/classes.d.ts CHANGED
@@ -4,6 +4,7 @@ export interface mlocData {
4
4
  lat: string;
5
5
  lon: string;
6
6
  };
7
+ isCapital?: boolean;
7
8
  }
8
9
  export declare class mLoc {
9
10
  id: string;
@@ -13,4 +14,5 @@ export declare class mLoc {
13
14
  getName(): string;
14
15
  getLatitude(): string;
15
16
  getLongitude(): string;
17
+ isCapital(): boolean;
16
18
  }
package/dist/classes.js CHANGED
@@ -18,6 +18,9 @@ var mLoc = /** @class */ (function () {
18
18
  mLoc.prototype.getLongitude = function () {
19
19
  return this.data.center.lon;
20
20
  };
21
+ mLoc.prototype.isCapital = function () {
22
+ return !!this.data.isCapital;
23
+ };
21
24
  return mLoc;
22
25
  }());
23
26
  exports.mLoc = mLoc;
package/dist/index.js CHANGED
@@ -66,7 +66,8 @@ var mState = /** @class */ (function () {
66
66
  var astate = nLoc[stateCode];
67
67
  var state = {
68
68
  name: astate.name,
69
- center: astate.center
69
+ center: astate.center,
70
+ isCapital: astate.isCapital
70
71
  };
71
72
  states.push(new classes_1.mLoc(stateCode, state));
72
73
  }
@@ -89,7 +90,8 @@ var mState = /** @class */ (function () {
89
90
  var astate = nLoc[stateCode];
90
91
  var state = {
91
92
  name: astate.name,
92
- center: astate.center
93
+ center: astate.center,
94
+ isCapital: astate.isCapital
93
95
  };
94
96
  return new classes_1.mLoc(stateCode, state);
95
97
  }
package/dist/locs.d.ts CHANGED
@@ -12,6 +12,7 @@ export interface LocsMap {
12
12
  lat: string;
13
13
  lon: string;
14
14
  };
15
+ isCapital?: boolean;
15
16
  lgas?: {
16
17
  [key: string]: {
17
18
  name: string;
@@ -19,6 +20,7 @@ export interface LocsMap {
19
20
  lat: string;
20
21
  lon: string;
21
22
  };
23
+ isCapital?: boolean;
22
24
  };
23
25
  };
24
26
  };
package/dist/locs.js CHANGED
@@ -116,6 +116,7 @@ exports.locs = {
116
116
  },
117
117
  "14": {
118
118
  "name": "Umuahia North",
119
+ "isCapital": true,
119
120
  "center": {
120
121
  "lat": "5.5393",
121
122
  "lon": "7.5492"
@@ -123,6 +124,7 @@ exports.locs = {
123
124
  },
124
125
  "15": {
125
126
  "name": "Umuahia South",
127
+ "isCapital": true,
126
128
  "center": {
127
129
  "lat": "5.5089",
128
130
  "lon": "7.5181"
@@ -286,6 +288,7 @@ exports.locs = {
286
288
  },
287
289
  "20": {
288
290
  "name": "Yola North",
291
+ "isCapital": true,
289
292
  "center": {
290
293
  "lat": "9.3541",
291
294
  "lon": "12.4556"
@@ -293,6 +296,7 @@ exports.locs = {
293
296
  },
294
297
  "21": {
295
298
  "name": "Yola South",
299
+ "isCapital": true,
296
300
  "center": {
297
301
  "lat": "9.2095",
298
302
  "lon": "12.4788"
@@ -519,6 +523,7 @@ exports.locs = {
519
523
  },
520
524
  "30": {
521
525
  "name": "Uyo",
526
+ "isCapital": true,
522
527
  "center": {
523
528
  "lat": "5.0279",
524
529
  "lon": "7.9264"
@@ -563,6 +568,7 @@ exports.locs = {
563
568
  },
564
569
  "04": {
565
570
  "name": "Awka North",
571
+ "isCapital": true,
566
572
  "center": {
567
573
  "lat": "6.2937",
568
574
  "lon": "7.0553"
@@ -570,6 +576,7 @@ exports.locs = {
570
576
  },
571
577
  "05": {
572
578
  "name": "Awka South",
579
+ "isCapital": true,
573
580
  "center": {
574
581
  "lat": "6.1984",
575
582
  "lon": "7.0482"
@@ -698,6 +705,7 @@ exports.locs = {
698
705
  },
699
706
  "01": {
700
707
  "name": "Bauchi",
708
+ "isCapital": true,
701
709
  "center": {
702
710
  "lat": "10.3134",
703
711
  "lon": "9.8450"
@@ -889,6 +897,7 @@ exports.locs = {
889
897
  },
890
898
  "07": {
891
899
  "name": "Yenagoa",
900
+ "isCapital": true,
892
901
  "center": {
893
902
  "lat": "4.9247",
894
903
  "lon": "6.2642"
@@ -989,6 +998,7 @@ exports.locs = {
989
998
  },
990
999
  "12": {
991
1000
  "name": "Makurdi",
1001
+ "isCapital": true,
992
1002
  "center": {
993
1003
  "lat": "7.7383",
994
1004
  "lon": "8.5200"
@@ -1215,6 +1225,7 @@ exports.locs = {
1215
1225
  },
1216
1226
  "20": {
1217
1227
  "name": "Maiduguri",
1228
+ "isCapital": true,
1218
1229
  "center": {
1219
1230
  "lat": "11.8495",
1220
1231
  "lon": "13.1600"
@@ -1322,6 +1333,7 @@ exports.locs = {
1322
1333
  },
1323
1334
  "07": {
1324
1335
  "name": "Calabar Municipal",
1336
+ "isCapital": true,
1325
1337
  "center": {
1326
1338
  "lat": "4.9702",
1327
1339
  "lon": "8.3290"
@@ -1329,6 +1341,7 @@ exports.locs = {
1329
1341
  },
1330
1342
  "08": {
1331
1343
  "name": "Calabar South",
1344
+ "isCapital": true,
1332
1345
  "center": {
1333
1346
  "lat": "4.9536",
1334
1347
  "lon": "8.3224"
@@ -1506,6 +1519,7 @@ exports.locs = {
1506
1519
  },
1507
1520
  "14": {
1508
1521
  "name": "Oshimili South",
1522
+ "isCapital": true,
1509
1523
  "center": {
1510
1524
  "lat": "6.1429",
1511
1525
  "lon": "6.2221"
@@ -1592,6 +1606,7 @@ exports.locs = {
1592
1606
  "lgas": {
1593
1607
  "00": {
1594
1608
  "name": "Abakaliki",
1609
+ "isCapital": true,
1595
1610
  "center": {
1596
1611
  "lat": "6.3250",
1597
1612
  "lon": "8.1247"
@@ -1699,6 +1714,7 @@ exports.locs = {
1699
1714
  },
1700
1715
  "01": {
1701
1716
  "name": "Egor",
1717
+ "isCapital": true,
1702
1718
  "center": {
1703
1719
  "lat": "6.4659",
1704
1720
  "lon": "6.3408"
@@ -1762,6 +1778,7 @@ exports.locs = {
1762
1778
  },
1763
1779
  "10": {
1764
1780
  "name": "Ikpoba-Okha",
1781
+ "isCapital": true,
1765
1782
  "center": {
1766
1783
  "lat": "6.3050",
1767
1784
  "lon": "6.6736"
@@ -1769,6 +1786,7 @@ exports.locs = {
1769
1786
  },
1770
1787
  "11": {
1771
1788
  "name": "Oredo",
1789
+ "isCapital": true,
1772
1790
  "center": {
1773
1791
  "lat": "6.3701",
1774
1792
  "lon": "5.6716"
@@ -1827,6 +1845,7 @@ exports.locs = {
1827
1845
  "lgas": {
1828
1846
  "00": {
1829
1847
  "name": "Ado Ekiti",
1848
+ "isCapital": true,
1830
1849
  "center": {
1831
1850
  "lat": "7.6239",
1832
1851
  "lon": "5.2202"
@@ -1962,6 +1981,7 @@ exports.locs = {
1962
1981
  },
1963
1982
  "02": {
1964
1983
  "name": "Enugu East",
1984
+ "isCapital": true,
1965
1985
  "center": {
1966
1986
  "lat": "6.4421",
1967
1987
  "lon": "7.6483"
@@ -1969,6 +1989,7 @@ exports.locs = {
1969
1989
  },
1970
1990
  "03": {
1971
1991
  "name": "Enugu North",
1992
+ "isCapital": true,
1972
1993
  "center": {
1973
1994
  "lat": "6.5438",
1974
1995
  "lon": "7.4837"
@@ -1976,6 +1997,7 @@ exports.locs = {
1976
1997
  },
1977
1998
  "04": {
1978
1999
  "name": "Enugu South",
2000
+ "isCapital": true,
1979
2001
  "center": {
1980
2002
  "lat": "6.3660",
1981
2003
  "lon": "7.4669"
@@ -2111,6 +2133,7 @@ exports.locs = {
2111
2133
  },
2112
2134
  "05": {
2113
2135
  "name": "Gombe",
2136
+ "isCapital": true,
2114
2137
  "center": {
2115
2138
  "lat": "10.2897",
2116
2139
  "lon": "11.1676"
@@ -2330,6 +2353,7 @@ exports.locs = {
2330
2353
  },
2331
2354
  "24": {
2332
2355
  "name": "Owerri Municipal",
2356
+ "isCapital": true,
2333
2357
  "center": {
2334
2358
  "lat": "5.4930",
2335
2359
  "lon": "7.0148"
@@ -2337,6 +2361,7 @@ exports.locs = {
2337
2361
  },
2338
2362
  "25": {
2339
2363
  "name": "Owerri North",
2364
+ "isCapital": true,
2340
2365
  "center": {
2341
2366
  "lat": "5.4921",
2342
2367
  "lon": "7.0357"
@@ -2344,6 +2369,7 @@ exports.locs = {
2344
2369
  },
2345
2370
  "26": {
2346
2371
  "name": "Owerri West",
2372
+ "isCapital": true,
2347
2373
  "center": {
2348
2374
  "lat": "5.5279",
2349
2375
  "lon": "7.0276"
@@ -2395,6 +2421,7 @@ exports.locs = {
2395
2421
  },
2396
2422
  "05": {
2397
2423
  "name": "Dutse",
2424
+ "isCapital": true,
2398
2425
  "center": {
2399
2426
  "lat": "11.7590",
2400
2427
  "lon": "9.3375"
@@ -2614,6 +2641,7 @@ exports.locs = {
2614
2641
  },
2615
2642
  "08": {
2616
2643
  "name": "Kaduna North",
2644
+ "isCapital": true,
2617
2645
  "center": {
2618
2646
  "lat": "10.6463",
2619
2647
  "lon": "7.4407"
@@ -2621,6 +2649,7 @@ exports.locs = {
2621
2649
  },
2622
2650
  "09": {
2623
2651
  "name": "Kaduna South",
2652
+ "isCapital": true,
2624
2653
  "center": {
2625
2654
  "lat": "10.2592",
2626
2655
  "lon": "7.5277"
@@ -2868,6 +2897,7 @@ exports.locs = {
2868
2897
  },
2869
2898
  "20": {
2870
2899
  "name": "Kano Municipal",
2900
+ "isCapital": true,
2871
2901
  "center": {
2872
2902
  "lat": "12.0303",
2873
2903
  "lon": "8.5205"
@@ -3178,6 +3208,7 @@ exports.locs = {
3178
3208
  },
3179
3209
  "19": {
3180
3210
  "name": "Katsina",
3211
+ "isCapital": true,
3181
3212
  "center": {
3182
3213
  "lat": "12.9908",
3183
3214
  "lon": "7.6018"
@@ -3313,6 +3344,7 @@ exports.locs = {
3313
3344
  },
3314
3345
  "04": {
3315
3346
  "name": "Birnin Kebbi",
3347
+ "isCapital": true,
3316
3348
  "center": {
3317
3349
  "lat": "12.4534",
3318
3350
  "lon": "4.1979"
@@ -3504,6 +3536,7 @@ exports.locs = {
3504
3536
  },
3505
3537
  "11": {
3506
3538
  "name": "Lokoja",
3539
+ "isCapital": true,
3507
3540
  "center": {
3508
3541
  "lat": "7.8056",
3509
3542
  "lon": "6.7476"
@@ -3618,6 +3651,7 @@ exports.locs = {
3618
3651
  },
3619
3652
  "05": {
3620
3653
  "name": "Ilorin East",
3654
+ "isCapital": true,
3621
3655
  "center": {
3622
3656
  "lat": "8.4951",
3623
3657
  "lon": "4.7211"
@@ -3625,6 +3659,7 @@ exports.locs = {
3625
3659
  },
3626
3660
  "06": {
3627
3661
  "name": "Ilorin South",
3662
+ "isCapital": true,
3628
3663
  "center": {
3629
3664
  "lat": "8.4590",
3630
3665
  "lon": "4.4878"
@@ -3632,6 +3667,7 @@ exports.locs = {
3632
3667
  },
3633
3668
  "07": {
3634
3669
  "name": "Ilorin West",
3670
+ "isCapital": true,
3635
3671
  "center": {
3636
3672
  "lat": "8.4634",
3637
3673
  "lon": "4.5574"
@@ -3774,6 +3810,7 @@ exports.locs = {
3774
3810
  },
3775
3811
  "10": {
3776
3812
  "name": "Ikeja",
3813
+ "isCapital": true,
3777
3814
  "center": {
3778
3815
  "lat": "6.5950",
3779
3816
  "lon": "3.3423"
@@ -3902,6 +3939,7 @@ exports.locs = {
3902
3939
  },
3903
3940
  "07": {
3904
3941
  "name": "Lafia",
3942
+ "isCapital": true,
3905
3943
  "center": {
3906
3944
  "lat": "8.4966",
3907
3945
  "lon": "8.5154"
@@ -3981,6 +4019,7 @@ exports.locs = {
3981
4019
  },
3982
4020
  "04": {
3983
4021
  "name": "Bosso",
4022
+ "isCapital": true,
3984
4023
  "center": {
3985
4024
  "lat": "9.9703",
3986
4025
  "lon": "6.3814"
@@ -3988,6 +4027,7 @@ exports.locs = {
3988
4027
  },
3989
4028
  "05": {
3990
4029
  "name": "Chanchaga",
4030
+ "isCapital": true,
3991
4031
  "center": {
3992
4032
  "lat": "9.5950",
3993
4033
  "lon": "6.5561"
@@ -4137,6 +4177,7 @@ exports.locs = {
4137
4177
  "lgas": {
4138
4178
  "00": {
4139
4179
  "name": "Abeokuta North",
4180
+ "isCapital": true,
4140
4181
  "center": {
4141
4182
  "lat": "7.4500",
4142
4183
  "lon": "3.3500"
@@ -4144,6 +4185,7 @@ exports.locs = {
4144
4185
  },
4145
4186
  "01": {
4146
4187
  "name": "Abeokuta South",
4188
+ "isCapital": true,
4147
4189
  "center": {
4148
4190
  "lat": "7.1608",
4149
4191
  "lon": "3.3247"
@@ -4314,6 +4356,7 @@ exports.locs = {
4314
4356
  },
4315
4357
  "04": {
4316
4358
  "name": "Akure North",
4359
+ "isCapital": true,
4317
4360
  "center": {
4318
4361
  "lat": "7.3171",
4319
4362
  "lon": "5.7513"
@@ -4321,6 +4364,7 @@ exports.locs = {
4321
4364
  },
4322
4365
  "05": {
4323
4366
  "name": "Akure South",
4367
+ "isCapital": true,
4324
4368
  "center": {
4325
4369
  "lat": "7.2711",
4326
4370
  "lon": "5.2136"
@@ -4624,6 +4668,7 @@ exports.locs = {
4624
4668
  },
4625
4669
  "29": {
4626
4670
  "name": "Osogbo",
4671
+ "isCapital": true,
4627
4672
  "center": {
4628
4673
  "lat": "7.7679",
4629
4674
  "lon": "4.5560"
@@ -4675,6 +4720,7 @@ exports.locs = {
4675
4720
  },
4676
4721
  "05": {
4677
4722
  "name": "Ibadan North",
4723
+ "isCapital": true,
4678
4724
  "center": {
4679
4725
  "lat": "7.4116",
4680
4726
  "lon": "3.9256"
@@ -4682,6 +4728,7 @@ exports.locs = {
4682
4728
  },
4683
4729
  "06": {
4684
4730
  "name": "Ibadan North-East",
4731
+ "isCapital": true,
4685
4732
  "center": {
4686
4733
  "lat": "7.4040",
4687
4734
  "lon": "3.9867"
@@ -4689,6 +4736,7 @@ exports.locs = {
4689
4736
  },
4690
4737
  "07": {
4691
4738
  "name": "Ibadan North-West",
4739
+ "isCapital": true,
4692
4740
  "center": {
4693
4741
  "lat": "7.4197",
4694
4742
  "lon": "3.8340"
@@ -4696,6 +4744,7 @@ exports.locs = {
4696
4744
  },
4697
4745
  "08": {
4698
4746
  "name": "Ibadan South-East",
4747
+ "isCapital": true,
4699
4748
  "center": {
4700
4749
  "lat": "7.3420",
4701
4750
  "lon": "3.9465"
@@ -4703,6 +4752,7 @@ exports.locs = {
4703
4752
  },
4704
4753
  "09": {
4705
4754
  "name": "Ibadan South-West",
4755
+ "isCapital": true,
4706
4756
  "center": {
4707
4757
  "lat": "7.3770",
4708
4758
  "lon": "3.8956"
@@ -4901,6 +4951,7 @@ exports.locs = {
4901
4951
  },
4902
4952
  "03": {
4903
4953
  "name": "Jos East",
4954
+ "isCapital": true,
4904
4955
  "center": {
4905
4956
  "lat": "9.7986",
4906
4957
  "lon": "9.9823"
@@ -4908,6 +4959,7 @@ exports.locs = {
4908
4959
  },
4909
4960
  "04": {
4910
4961
  "name": "Jos North",
4962
+ "isCapital": true,
4911
4963
  "center": {
4912
4964
  "lat": "9.9734",
4913
4965
  "lon": "8.9649"
@@ -4915,6 +4967,7 @@ exports.locs = {
4915
4967
  },
4916
4968
  "05": {
4917
4969
  "name": "Jos South",
4970
+ "isCapital": true,
4918
4971
  "center": {
4919
4972
  "lat": "9.8004",
4920
4973
  "lon": "8.9963"
@@ -5106,6 +5159,7 @@ exports.locs = {
5106
5159
  },
5107
5160
  "14": {
5108
5161
  "name": "Obio/Akpor",
5162
+ "isCapital": true,
5109
5163
  "center": {
5110
5164
  "lat": "4.8194",
5111
5165
  "lon": "7.0229"
@@ -5155,6 +5209,7 @@ exports.locs = {
5155
5209
  },
5156
5210
  "21": {
5157
5211
  "name": "Port Harcourt",
5212
+ "isCapital": true,
5158
5213
  "center": {
5159
5214
  "lat": "4.8156",
5160
5215
  "lon": "7.0498"
@@ -5283,6 +5338,7 @@ exports.locs = {
5283
5338
  },
5284
5339
  "15": {
5285
5340
  "name": "Sokoto North",
5341
+ "isCapital": true,
5286
5342
  "center": {
5287
5343
  "lat": "13.0688",
5288
5344
  "lon": "5.2160"
@@ -5290,6 +5346,7 @@ exports.locs = {
5290
5346
  },
5291
5347
  "16": {
5292
5348
  "name": "Sokoto South",
5349
+ "isCapital": true,
5293
5350
  "center": {
5294
5351
  "lat": "13.0688",
5295
5352
  "lon": "5.2160"
@@ -5390,6 +5447,7 @@ exports.locs = {
5390
5447
  },
5391
5448
  "06": {
5392
5449
  "name": "Jalingo",
5450
+ "isCapital": true,
5393
5451
  "center": {
5394
5452
  "lat": "8.8932",
5395
5453
  "lon": "11.3599"
@@ -5483,6 +5541,7 @@ exports.locs = {
5483
5541
  },
5484
5542
  "02": {
5485
5543
  "name": "Damaturu",
5544
+ "isCapital": true,
5486
5545
  "center": {
5487
5546
  "lat": "11.7481",
5488
5547
  "lon": "11.9605"
@@ -5646,6 +5705,7 @@ exports.locs = {
5646
5705
  },
5647
5706
  "07": {
5648
5707
  "name": "Gusau",
5708
+ "isCapital": true,
5649
5709
  "center": {
5650
5710
  "lat": "12.1700",
5651
5711
  "lon": "6.6644"
@@ -5701,6 +5761,7 @@ exports.locs = {
5701
5761
  "lat": "9.0579",
5702
5762
  "lon": "7.4951"
5703
5763
  },
5764
+ "isCapital": true,
5704
5765
  "lgas": {
5705
5766
  "00": {
5706
5767
  "name": "Abaji",
@@ -5711,6 +5772,7 @@ exports.locs = {
5711
5772
  },
5712
5773
  "01": {
5713
5774
  "name": "Abuja Municipal",
5775
+ "isCapital": true,
5714
5776
  "center": {
5715
5777
  "lat": "8.9253",
5716
5778
  "lon": "7.2952"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "monagree-locs",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
4
4
  "description": "All countries + States and LGAs in Nigeria (with GPS coordinates)",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",