monagree-locs 1.0.3 → 1.0.5

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/dist/classes.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- interface stateData {
1
+ interface mlocData {
2
2
  name: string;
3
3
  center: {
4
4
  lat: number;
@@ -7,7 +7,11 @@ interface stateData {
7
7
  }
8
8
  export declare class mLoc {
9
9
  id: string;
10
- data: stateData;
11
- constructor(id: string, data: stateData);
10
+ data: mlocData;
11
+ constructor(id: string, data: mlocData);
12
+ getId(): string;
13
+ getName(): string;
14
+ getLatitude(): number;
15
+ getLongitude(): number;
12
16
  }
13
17
  export {};
package/dist/classes.js CHANGED
@@ -1,11 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.mLoc = void 0;
4
- var mLoc = /** @class */ (function () {
5
- function mLoc(id, data) {
6
- this.id = id;
7
- this.data = data;
8
- }
9
- return mLoc;
10
- }());
11
- exports.mLoc = mLoc;
1
+ 'use strict';var a0_0x261058=a0_0x469b;function a0_0x2243(){var _0x45f438=['__esModule','3465ZdaZtj','getName','241236nJPqbJ','2574270EVuogr','lon','575139cqHbsm','prototype','11JmQrPf','4767uUKvWc','91bUhQOT','lat','getId','name','432pRFsjf','4840KQrdOF','data','mLoc','27723800eXyeEO','1526460Hahjqx','getLongitude','center'];a0_0x2243=function(){return _0x45f438;};return a0_0x2243();}(function(_0x26314f,_0x1cb19e){var _0x5677df=a0_0x469b,_0x3b9470=_0x26314f();while(!![]){try{var _0x39f523=-parseInt(_0x5677df(0xe6))/0x1+-parseInt(_0x5677df(0xf3))/0x2+parseInt(_0x5677df(0xe9))/0x3*(-parseInt(_0x5677df(0xee))/0x4)+-parseInt(_0x5677df(0xfa))/0x5+parseInt(_0x5677df(0xf9))/0x6*(-parseInt(_0x5677df(0xea))/0x7)+-parseInt(_0x5677df(0xef))/0x8*(-parseInt(_0x5677df(0xf7))/0x9)+-parseInt(_0x5677df(0xf2))/0xa*(-parseInt(_0x5677df(0xe8))/0xb);if(_0x39f523===_0x1cb19e)break;else _0x3b9470['push'](_0x3b9470['shift']());}catch(_0x59857d){_0x3b9470['push'](_0x3b9470['shift']());}}}(a0_0x2243,0x6fc40));function a0_0x469b(_0x20d587,_0x5c00d4){var _0x2243fd=a0_0x2243();return a0_0x469b=function(_0x469b4f,_0x311ffe){_0x469b4f=_0x469b4f-0xe5;var _0x44cbcf=_0x2243fd[_0x469b4f];return _0x44cbcf;},a0_0x469b(_0x20d587,_0x5c00d4);}Object['defineProperty'](exports,a0_0x261058(0xf6),{'value':!![]}),exports['mLoc']=void 0x0;var mLoc=(function(){var _0x6db65b=a0_0x261058;function _0xb02da8(_0x20160f,_0x5cbdc8){this['id']=_0x20160f,this['data']=_0x5cbdc8;}return _0xb02da8[_0x6db65b(0xe7)][_0x6db65b(0xec)]=function(){return this['id'];},_0xb02da8[_0x6db65b(0xe7)][_0x6db65b(0xf8)]=function(){var _0x1098e7=_0x6db65b;return this[_0x1098e7(0xf0)][_0x1098e7(0xed)];},_0xb02da8[_0x6db65b(0xe7)]['getLatitude']=function(){var _0x2cce29=_0x6db65b;return this['data'][_0x2cce29(0xf5)][_0x2cce29(0xeb)];},_0xb02da8[_0x6db65b(0xe7)][_0x6db65b(0xf4)]=function(){var _0x55a944=_0x6db65b;return this[_0x55a944(0xf0)][_0x55a944(0xf5)][_0x55a944(0xe5)];},_0xb02da8;}());exports[a0_0x261058(0xf1)]=mLoc;
package/dist/index.d.ts CHANGED
@@ -1,3 +1,13 @@
1
1
  import { mLoc } from "./classes";
2
- export declare function getAllStatesInNigeria(): mLoc[];
3
- export declare function getLgasByState(stateCode: string): mLoc[];
2
+ export declare class mCountry {
3
+ static getAllCountries(): mLoc[];
4
+ static getCountryByCode(countryCode: string): mLoc | undefined;
5
+ }
6
+ export declare class mState {
7
+ static getStatesByCountry(countryCode: string): mLoc[];
8
+ static getStateByCode(countryCode: string, stateCode: string): mLoc | undefined;
9
+ }
10
+ export declare class mLga {
11
+ static getLgasByState(countryCode: string, stateCode: string): mLoc[];
12
+ static getLgaByCode(countryCode: string, stateCode: string, lgaCode: string): mLoc | undefined;
13
+ }
package/dist/index.js CHANGED
@@ -1,31 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getLgasByState = exports.getAllStatesInNigeria = void 0;
4
- var classes_1 = require("./classes");
5
- var locs_1 = require("./locs");
6
- function getAllStatesInNigeria() {
7
- var states = [];
8
- for (var stateCode in locs_1.locs) {
9
- if (locs_1.locs.hasOwnProperty(stateCode)) {
10
- var state = locs_1.locs[stateCode];
11
- delete state['lga'];
12
- states.push(new classes_1.mLoc(stateCode, state));
13
- }
14
- }
15
- return states;
16
- }
17
- exports.getAllStatesInNigeria = getAllStatesInNigeria;
18
- function getLgasByState(stateCode) {
19
- var lgas = [];
20
- var state = locs_1.locs[stateCode];
21
- if (state) {
22
- for (var lgaCode in state['lgas']) {
23
- if (state['lgas'].hasOwnProperty(lgaCode)) {
24
- var lga = state['lgas'][lgaCode];
25
- lgas.push(new classes_1.mLoc(lgaCode, lga));
26
- }
27
- }
28
- }
29
- return lgas;
30
- }
31
- exports.getLgasByState = getLgasByState;
1
+ 'use strict';var a1_0x2f0240=a1_0xb576;(function(_0x1a1d71,_0x43f863){var _0x268297=a1_0xb576,_0x5a2006=_0x1a1d71();while(!![]){try{var _0x11d34a=parseInt(_0x268297(0xb5))/0x1+parseInt(_0x268297(0xa1))/0x2*(-parseInt(_0x268297(0xa0))/0x3)+-parseInt(_0x268297(0xb2))/0x4*(parseInt(_0x268297(0xb7))/0x5)+parseInt(_0x268297(0xa4))/0x6*(parseInt(_0x268297(0xb8))/0x7)+-parseInt(_0x268297(0xac))/0x8+-parseInt(_0x268297(0xa5))/0x9+parseInt(_0x268297(0xb6))/0xa;if(_0x11d34a===_0x43f863)break;else _0x5a2006['push'](_0x5a2006['shift']());}catch(_0x473570){_0x5a2006['push'](_0x5a2006['shift']());}}}(a1_0x30e4,0xab938));function a1_0xb576(_0x2c851b,_0x11d33a){var _0x30e4f2=a1_0x30e4();return a1_0xb576=function(_0xb5763c,_0x13c2bb){_0xb5763c=_0xb5763c-0x9d;var _0x482009=_0x30e4f2[_0xb5763c];return _0x482009;},a1_0xb576(_0x2c851b,_0x11d33a);}Object[a1_0x2f0240(0xa6)](exports,a1_0x2f0240(0xb0),{'value':!![]}),exports['mLga']=exports[a1_0x2f0240(0xa8)]=exports[a1_0x2f0240(0xb3)]=void 0x0;function a1_0x30e4(){var _0x41be24=['mState','lgas','getCountryByCode','getAllCountries','1923984DSdUhV','./classes','mLoc','./locs','__esModule','lga','68AqkbPX','mCountry','getLgasByState','1066471ACrjkB','10510430dUwSDU','115545dRJQJp','1896475cTyfKy','hasOwnProperty','getLgaByCode','locs','3339jQNECb','2346MrZYBk','mLga','states','30sLwUtA','7474167kWYdKh','defineProperty','push'];a1_0x30e4=function(){return _0x41be24;};return a1_0x30e4();}var classes_1=require(a1_0x2f0240(0xad)),locs_1=require(a1_0x2f0240(0xaf)),mCountry=(function(){var _0x4338ed=a1_0x2f0240;function _0x392d16(){}return _0x392d16[_0x4338ed(0xab)]=function(){var _0x3f417d=_0x4338ed,_0x5813f7=[];for(var _0xe3cc0f in locs_1[_0x3f417d(0x9f)]){if(locs_1[_0x3f417d(0x9f)]['hasOwnProperty'](_0xe3cc0f)){var _0x1ed588=locs_1[_0x3f417d(0x9f)][_0xe3cc0f];delete _0x1ed588['states'],_0x5813f7[_0x3f417d(0xa7)](new classes_1[(_0x3f417d(0xae))](_0xe3cc0f,_0x1ed588));}}return _0x5813f7;},_0x392d16[_0x4338ed(0xaa)]=function(_0x401f0d){var _0x2392d7=_0x4338ed;if(locs_1[_0x2392d7(0x9f)][_0x401f0d]){var _0x5c94d2=locs_1[_0x2392d7(0x9f)][_0x401f0d];return delete _0x5c94d2[_0x2392d7(0xa3)],new classes_1[(_0x2392d7(0xae))](_0x401f0d,_0x5c94d2);}return undefined;},_0x392d16;}());exports[a1_0x2f0240(0xb3)]=mCountry;var mState=(function(){function _0x9f70e8(){}return _0x9f70e8['getStatesByCountry']=function(_0x4b69ca){var _0x270076=a1_0xb576,_0x321bc1=[];if(locs_1[_0x270076(0x9f)][_0x4b69ca]){var _0x18b73e=locs_1[_0x270076(0x9f)][_0x4b69ca][_0x270076(0xa3)];for(var _0x2ba5a6 in _0x18b73e){if(_0x18b73e[_0x270076(0x9d)](_0x2ba5a6)){var _0x411eaf=_0x18b73e[_0x2ba5a6];delete _0x411eaf[_0x270076(0xb1)],_0x321bc1[_0x270076(0xa7)](new classes_1['mLoc'](_0x2ba5a6,_0x411eaf));}}}return _0x321bc1;},_0x9f70e8['getStateByCode']=function(_0x486fe9,_0x2f3070){var _0x734125=a1_0xb576;if(locs_1[_0x734125(0x9f)][_0x486fe9]){var _0x153ab9=locs_1[_0x734125(0x9f)][_0x486fe9][_0x734125(0xa3)];if(_0x153ab9[_0x2f3070]){var _0x4476da=_0x153ab9[_0x2f3070];return delete _0x4476da[_0x734125(0xb1)],new classes_1[(_0x734125(0xae))](_0x2f3070,_0x4476da);}}return undefined;},_0x9f70e8;}());exports[a1_0x2f0240(0xa8)]=mState;var mLga=(function(){var _0x18a960=a1_0x2f0240;function _0x14342d(){}return _0x14342d[_0x18a960(0xb4)]=function(_0x1dd21b,_0x444dbd){var _0x11bdeb=_0x18a960,_0x1917ec=[];if(locs_1[_0x11bdeb(0x9f)][_0x1dd21b]){var _0x2ccb80=locs_1[_0x11bdeb(0x9f)][_0x1dd21b][_0x11bdeb(0xa3)];if(_0x2ccb80[_0x444dbd]){var _0xa6fa8f=_0x2ccb80[_0x444dbd][_0x11bdeb(0xa9)];for(var _0x4dec0c in _0xa6fa8f){if(_0xa6fa8f[_0x11bdeb(0x9d)](_0x4dec0c)){var _0x875e25=_0xa6fa8f[_0x4dec0c];_0x1917ec[_0x11bdeb(0xa7)](new classes_1[(_0x11bdeb(0xae))](_0x4dec0c,_0x875e25));}}}}return _0x1917ec;},_0x14342d[_0x18a960(0x9e)]=function(_0x452ab2,_0x435ba9,_0x508ef7){var _0x865f48=_0x18a960;if(locs_1[_0x865f48(0x9f)][_0x452ab2]){var _0x105bef=locs_1[_0x865f48(0x9f)][_0x452ab2][_0x865f48(0xa3)];if(_0x105bef[_0x435ba9]){var _0x2f84de=_0x105bef[_0x435ba9][_0x865f48(0xa9)];if(_0x2f84de[_0x508ef7]){var _0x13bcdf=_0x2f84de[_0x508ef7];return new classes_1[(_0x865f48(0xae))](_0x508ef7,_0x13bcdf);}}}return undefined;},_0x14342d;}());exports[a1_0x2f0240(0xa2)]=mLga;