You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+31-15Lines changed: 31 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,7 @@ Shared TypeScript utilities for removing repeated code across Sovereignbase code
12
12
- Runtimes: modern JavaScript runtimes; the repository includes runtime compatibility tests for Node, Bun, Deno, Cloudflare Workers, Edge Runtime, and browsers.
13
13
- Module format: ESM and CommonJS.
14
14
- Required globals / APIs: `structuredClone` is required for successful `safeStructuredClone()` results.
15
+
- Browser capability checks: `browserHasSovereignbaseDependencies()` resolves to `false` outside secure browser contexts and when required browser APIs are missing.
15
16
- TypeScript: bundled types.
16
17
17
18
## Goals
@@ -77,6 +78,8 @@ if (result[0]) {
77
78
}
78
79
```
79
80
81
+
Attempts a structured clone and returns a tuple instead of throwing on unsupported values.
82
+
80
83
### `getISO31661Alpha2CountryCodeSet()`
81
84
82
85
```ts
@@ -93,32 +96,45 @@ function epicFunction1(countryCode: ISO31661Alpha2) {
93
96
}
94
97
```
95
98
96
-
Attempts a structured clone and returns a tuple instead of throwing on unsupported values.
99
+
Returns a fresh `Set` containing all supported ISO 3166-1 alpha-2 country codes.
Checks whether the current browser environment exposes the secure-context, storage, worker, notification, Web Crypto, and WebAuthn APIs required by Sovereignbase browser features.
97
112
98
113
## Tests
99
114
100
115
- Latest local `npm run test` run passed on Node `v22.14.0`.
101
-
- Node unit suite: `5/5` passed.
116
+
- Node unit suite: `9/9` passed.
102
117
- Node integration suite: `2/2` passed.
103
118
- Coverage: `100%` statements, branches, functions, and lines.
0 commit comments