@dxtmisha/functional-basic 1.3.3 → 1.3.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/CHANGELOG.md +20 -0
- package/ai-description.txt +7 -12
- package/ai-types.txt +104 -746
- package/dist/library.js +6 -4
- package/dist/src/classes/GeoFlag.d.ts +4 -2
- package/package.json +1 -1
package/dist/library.js
CHANGED
|
@@ -2669,11 +2669,12 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
2669
2669
|
var t;
|
|
2670
2670
|
return (t = this.get(e)) == null ? void 0 : t.icon;
|
|
2671
2671
|
}
|
|
2672
|
-
getList(e) {
|
|
2673
|
-
|
|
2672
|
+
getList(e, t = !0) {
|
|
2673
|
+
let n = r(this.getCodes(e), (e) => this.get(e));
|
|
2674
|
+
return t ? new R().sort(n, (e, t) => [e.label, t.label]) : n;
|
|
2674
2675
|
}
|
|
2675
|
-
getNational(t) {
|
|
2676
|
-
|
|
2676
|
+
getNational(t, n = !0) {
|
|
2677
|
+
let i = r(this.getList(t, !1), (t) => {
|
|
2677
2678
|
let n = new e(t.standard).get(t.standard);
|
|
2678
2679
|
return {
|
|
2679
2680
|
...t,
|
|
@@ -2682,6 +2683,7 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
2682
2683
|
nationalCountry: n == null ? void 0 : n.country
|
|
2683
2684
|
};
|
|
2684
2685
|
});
|
|
2686
|
+
return n ? new R().sort(i, (e, t) => [e.label, t.label]) : i;
|
|
2685
2687
|
}
|
|
2686
2688
|
setCode(e) {
|
|
2687
2689
|
return this.code = e, this;
|
|
@@ -52,17 +52,19 @@ export declare class GeoFlag {
|
|
|
52
52
|
* Возвращает список стран на основе предоставленных кодов.
|
|
53
53
|
* Если коды не переданы, возвращает все доступные страны.
|
|
54
54
|
* @param codes array of country codes / массив кодов стран
|
|
55
|
+
* @param sort whether to sort the list / сортировать ли список
|
|
55
56
|
* @returns list of countries / список стран
|
|
56
57
|
*/
|
|
57
|
-
getList(codes?: string[]): GeoFlagItem[];
|
|
58
|
+
getList(codes?: string[], sort?: boolean): GeoFlagItem[];
|
|
58
59
|
/**
|
|
59
60
|
* Returns a list of countries in their national languages.
|
|
60
61
|
*
|
|
61
62
|
* Возвращает список стран на их национальных языках.
|
|
62
63
|
* @param codes array of country codes / массив кодов стран
|
|
64
|
+
* @param sort whether to sort the list / сортировать ли список
|
|
63
65
|
* @returns list of countries with national names / список стран с национальными названиями
|
|
64
66
|
*/
|
|
65
|
-
getNational(codes?: string[]): GeoFlagNational[];
|
|
67
|
+
getNational(codes?: string[], sort?: boolean): GeoFlagNational[];
|
|
66
68
|
/**
|
|
67
69
|
* Changes the current locale/location.
|
|
68
70
|
*
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxtmisha/functional-basic",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.5",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Foundational utility library for modern web development — HTTP client, geolocation, i18n, SEO meta tags, caching, storage, DOM utilities, and more. Framework-agnostic, zero dependencies, TypeScript-first.",
|
|
7
7
|
"keywords": [
|