monagree-locs 1.0.8 → 1.0.9

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.
Files changed (2) hide show
  1. package/dist/index.js +20 -8
  2. package/package.json +2 -4
package/dist/index.js CHANGED
@@ -10,8 +10,11 @@ var mCountry = /** @class */ (function () {
10
10
  var countries = [];
11
11
  for (var countryCode in locs_1.locs) {
12
12
  if (locs_1.locs.hasOwnProperty(countryCode)) {
13
- var country = locs_1.locs[countryCode];
14
- delete country['states'];
13
+ var acountry = locs_1.locs[countryCode];
14
+ var country = {
15
+ name: acountry.name,
16
+ center: acountry.center
17
+ };
15
18
  countries.push(new classes_1.mLoc(countryCode, country));
16
19
  }
17
20
  }
@@ -19,8 +22,11 @@ var mCountry = /** @class */ (function () {
19
22
  };
20
23
  mCountry.getCountryByCode = function (countryCode) {
21
24
  if (locs_1.locs[countryCode]) {
22
- var country = locs_1.locs[countryCode];
23
- delete country['states'];
25
+ var acountry = locs_1.locs[countryCode];
26
+ var country = {
27
+ name: acountry.name,
28
+ center: acountry.center
29
+ };
24
30
  return new classes_1.mLoc(countryCode, country);
25
31
  }
26
32
  return undefined;
@@ -37,8 +43,11 @@ var mState = /** @class */ (function () {
37
43
  var nLoc = locs_1.locs[countryCode]['states'];
38
44
  for (var stateCode in nLoc) {
39
45
  if (nLoc.hasOwnProperty(stateCode)) {
40
- var state = nLoc[stateCode];
41
- delete state['lgas'];
46
+ var astate = nLoc[stateCode];
47
+ var state = {
48
+ name: astate.name,
49
+ center: astate.center
50
+ };
42
51
  states.push(new classes_1.mLoc(stateCode, state));
43
52
  }
44
53
  }
@@ -49,8 +58,11 @@ var mState = /** @class */ (function () {
49
58
  if (locs_1.locs[countryCode]) {
50
59
  var nLoc = locs_1.locs[countryCode]['states'];
51
60
  if (nLoc && nLoc[stateCode]) {
52
- var state = nLoc[stateCode];
53
- delete state['lgas'];
61
+ var astate = nLoc[stateCode];
62
+ var state = {
63
+ name: astate.name,
64
+ center: astate.center
65
+ };
54
66
  return new classes_1.mLoc(stateCode, state);
55
67
  }
56
68
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "monagree-locs",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "States and LGAs in Nigeria (with GPS coordinates)",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -10,8 +10,7 @@
10
10
  ],
11
11
  "scripts": {
12
12
  "test": "echo \"Error: no test specified\" && exit 1",
13
- "build": "tsc",
14
- "obs": "javascript-obfuscator dist --output dist"
13
+ "build": "tsc"
15
14
  },
16
15
  "repository": {
17
16
  "type": "git",
@@ -32,7 +31,6 @@
32
31
  },
33
32
  "homepage": "developers.monagree.com",
34
33
  "devDependencies": {
35
- "javascript-obfuscator": "^4.1.0",
36
34
  "@types/node": "^20.10.8",
37
35
  "typescript": "^5.3.3"
38
36
  }