country-data-filter 1.0.17 → 1.0.18

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/README.md +104 -63
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -15,52 +15,60 @@ JavaScript
15
15
  javascript
16
16
  Copy code
17
17
 
18
- ````js
18
+ ```js
19
19
  const {
20
- getDataByCountry,
21
- getDataByProvince,
22
- getDataByDistrict,
23
- getDataByCity,
24
- getDataByCountryProvince,
25
- getDataByCountryProvinceDistrict,
26
- getDataByCountryProvinceDistrictCity,
27
- getDataByEtherCountryProvinceDistrictCity,
28
- getDataByCountryDistrict,
29
- getDataByCountryCity,
30
- getDataByProvinceDistrict,
31
- getDataByProvinceCity,
32
- getDataByDistrictCity,
33
- getCurrencyByCountry,
34
- getDataByPostalCode,
35
- listFunctions,
36
- } = require('country-data-filter');```
20
+ getDataByCountry,
21
+ getDataByProvince,
22
+ getDataByDistrict,
23
+ getDataByCity,
24
+ getDataByCountryProvince,
25
+ getDataByCountryProvinceDistrict,
26
+ getDataByCountryProvinceDistrictCity,
27
+ getDataByEtherCountryProvinceDistrictCity,
28
+ getDataByCountryDistrict,
29
+ getDataByCountryCity,
30
+ getDataByProvinceDistrict,
31
+ getDataByProvinceCity,
32
+ getDataByDistrictCity,
33
+ getCurrencyByCountry,
34
+ getDataByPostalCode,
35
+ listFunctions,
36
+ } = require("country-data-filter");
37
+ ```
37
38
 
38
39
  TypeScript
39
40
  typescript
40
41
  Copy code
41
- `import {
42
- getDataByCountry,
43
- getDataByProvince,
44
- getDataByDistrict,
45
- getDataByCity,
46
- getDataByCountryProvince,
47
- getDataByCountryProvinceDistrict,
48
- getDataByCountryProvinceDistrictCity,
49
- getDataByEtherCountryProvinceDistrictCity,
50
- getDataByCountryDistrict,
51
- getDataByCountryCity,
52
- getDataByProvinceDistrict,
53
- getDataByProvinceCity,
54
- getDataByDistrictCity,
55
- getCurrencyByCountry,
56
- getDataByPostalCode,
57
- listFunctions,
58
- } from 'country-data-filter';`
42
+
43
+ ```js
44
+ import {
45
+ getDataByCountry,
46
+ getDataByProvince,
47
+ getDataByDistrict,
48
+ getDataByCity,
49
+ getDataByCountryProvince,
50
+ getDataByCountryProvinceDistrict,
51
+ getDataByCountryProvinceDistrictCity,
52
+ getDataByEtherCountryProvinceDistrictCity,
53
+ getDataByCountryDistrict,
54
+ getDataByCountryCity,
55
+ getDataByProvinceDistrict,
56
+ getDataByProvinceCity,
57
+ getDataByDistrictCity,
58
+ getCurrencyByCountry,
59
+ getDataByPostalCode,
60
+ listFunctions,
61
+ } from "country-data-filter";
62
+ ```
59
63
 
60
64
  javascript
61
65
  Copy code
62
- `const result = getDataByCountry(countryCode);
63
- console.log(result);`
66
+
67
+ ```js
68
+ const result = getDataByCountry(countryCode);
69
+ console.log(result);
70
+ ```
71
+
64
72
  Returns a list of provinces, districts, and cities for a given country code.
65
73
 
66
74
  Parameters:
@@ -71,8 +79,12 @@ An object containing sorted arrays of provinces, districts, and cities, or an er
71
79
 
72
80
  javascript
73
81
  Copy code
74
- `const result = getDataByDistrict(districtName);
75
- console.log(result);`
82
+
83
+ ```js
84
+ const result = getDataByDistrict(districtName);
85
+ console.log(result);
86
+ ```
87
+
76
88
  Returns the country code, province, and cities for a given district name.
77
89
 
78
90
  Parameters:
@@ -83,8 +95,12 @@ An object containing the country code, province name, and list of cities, or an
83
95
 
84
96
  javascript
85
97
  Copy code
86
- `const result = getDataByProvince(provinceName);
87
- console.log(result);`
98
+
99
+ ```js
100
+ const result = getDataByProvince(provinceName);
101
+ console.log(result);
102
+ ```
103
+
88
104
  Returns the list of districts and cities for a given province name.
89
105
 
90
106
  Parameters:
@@ -95,8 +111,12 @@ An object containing the list of districts and cities, or an error message if th
95
111
 
96
112
  javascript
97
113
  Copy code
98
- `const result = listFunctions()
99
- console.log(result)`
114
+
115
+ ```js
116
+ const result = listFunctions();
117
+ console.log(result);
118
+ ```
119
+
100
120
  Returns a list of all available functions in the package.
101
121
 
102
122
  Returns:
@@ -104,8 +124,11 @@ An object containing the filtered data list.
104
124
 
105
125
  javascript
106
126
  Copy code
107
- `const result = getDataByEtherCountryProvinceDistrictCity();
108
- console.log(result);`
127
+
128
+ ```js
129
+ const result = getDataByEtherCountryProvinceDistrictCity();
130
+ console.log(result);
131
+ ```
109
132
 
110
133
  Parameters:
111
134
  countryCode (string)?: The code of the country.
@@ -120,22 +143,34 @@ list of functions
120
143
 
121
144
  javascript
122
145
  Copy code
123
- ` getDataByCountry(countryCode); // countryCode: string
124
- getDataByProvince(provinceName); // provinceName: string
125
- getDataByDistrict(districtName); // districtName: string
126
- getDataByCity(cityName); // cityName: string
127
- getDataByCountryProvince(countryCode, provinceName); // countryCode: string, provinceName: string
128
- getDataByCountryProvinceDistrict(countryCode, provinceName, districtName); // countryCode: string, provinceName: string, districtName: string
129
- getDataByCountryProvinceDistrictCity(countryCode, provinceName, districtName, cityName); // countryCode: string, provinceName: string, districtName: string, cityName: string
130
- getDataByEtherCountryProvinceDistrictCity(countryCode, provinceName, districtName, cityName); // countryCode: string, provinceName: string, districtName: string, cityName: string
131
- getDataByCountryDistrict(countryCode, districtName); // countryCode: string, districtName: string
132
- getDataByCountryCity(countryCode, cityName); // countryCode: string, cityName: string
133
- getDataByProvinceDistrict(provinceName, districtName); // provinceName: string districtName: string
134
- getDataByProvinceCity(provinceName, cityName); // provinceName: string, cityName: string
135
- getDataByDistrictCity(districtName, cityName); // districtName: string, cityName: string
136
- getCurrencyByCountry(countryCode); // countryCode: string
137
- getDataByPostalCode(postalCode); // postalCode: string
138
- `
146
+
147
+ ```js
148
+ getDataByCountry(countryCode); // countryCode: string
149
+ getDataByProvince(provinceName); // provinceName: string
150
+ getDataByDistrict(districtName); // districtName: string
151
+ getDataByCity(cityName); // cityName: string
152
+ getDataByCountryProvince(countryCode, provinceName); // countryCode: string, provinceName: string
153
+ getDataByCountryProvinceDistrict(countryCode, provinceName, districtName); // countryCode: string, provinceName: string, districtName: string
154
+ getDataByCountryProvinceDistrictCity(
155
+ countryCode,
156
+ provinceName,
157
+ districtName,
158
+ cityName
159
+ ); // countryCode: string, provinceName: string, districtName: string, cityName: string
160
+ getDataByEtherCountryProvinceDistrictCity(
161
+ countryCode,
162
+ provinceName,
163
+ districtName,
164
+ cityName
165
+ ); // countryCode: string, provinceName: string, districtName: string, cityName: string
166
+ getDataByCountryDistrict(countryCode, districtName); // countryCode: string, districtName: string
167
+ getDataByCountryCity(countryCode, cityName); // countryCode: string, cityName: string
168
+ getDataByProvinceDistrict(provinceName, districtName); // provinceName: string districtName: string
169
+ getDataByProvinceCity(provinceName, cityName); // provinceName: string, cityName: string
170
+ getDataByDistrictCity(districtName, cityName); // districtName: string, cityName: string
171
+ getCurrencyByCountry(countryCode); // countryCode: string
172
+ getDataByPostalCode(postalCode); // postalCode: string
173
+ ```
139
174
 
140
175
  Contributing
141
176
  If you want to contribute to this project, please follow these steps:
@@ -150,4 +185,10 @@ This project is licensed under the MIT License. See the LICENSE file for details
150
185
  Contact
151
186
  For any questions or support, please contact knnadeera1@gmail.com.
152
187
 
153
- ````
188
+ ```
189
+
190
+ ```
191
+
192
+ ```
193
+
194
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "country-data-filter",
3
- "version": "1.0.17",
3
+ "version": "1.0.18",
4
4
  "description": "A package to filter country data",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",