@dxtmisha/functional-basic 1.4.2 → 1.4.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/CHANGELOG.md +6 -0
- package/dist/library.js +8 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [1.4.3] - 2026-06-25
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
- **GeoInstance**: Refactored the `findLanguage` helper to safely resolve custom language overrides from the location code (e.g. `'en-VN'`) by looking up and validating the existence of matching languages via `getByLanguage`, falling back to the country's default language if not found.
|
|
9
|
+
- **GeoInstance**: Updated both the `constructor` and `set()` methods to consistently resolve active language state via the updated `findLanguage` helper.
|
|
10
|
+
|
|
5
11
|
## [1.4.2] - 2026-06-25
|
|
6
12
|
|
|
7
13
|
### Added
|
package/dist/library.js
CHANGED
|
@@ -867,7 +867,14 @@ var we = () => D.get("__ui:cookie-items__", () => ({})), Te = class e {
|
|
|
867
867
|
return s() && (this.storage.get() || ((e = document.querySelector("html")) == null ? void 0 : e.lang) || navigator.language || navigator.languages[0] || void 0) || void 0;
|
|
868
868
|
}
|
|
869
869
|
findLanguage(e) {
|
|
870
|
-
|
|
870
|
+
if (e) {
|
|
871
|
+
let t = this.toLanguage(e);
|
|
872
|
+
if (t) {
|
|
873
|
+
let e = this.getByLanguage(t);
|
|
874
|
+
if (e) return e.language;
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
return this.item.language;
|
|
871
878
|
}
|
|
872
879
|
toCountry(e) {
|
|
873
880
|
return e.replace(/[^A-Z]+/g, "");
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxtmisha/functional-basic",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.4.
|
|
4
|
+
"version": "1.4.3",
|
|
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": [
|