@drewjbartlett/i17n
Advanced tools
Comparing version 0.0.18 to 0.0.19
@@ -5,3 +5,3 @@ { | ||
"type": "module", | ||
"version": "0.0.18", | ||
"version": "0.0.19", | ||
"files": [ | ||
@@ -8,0 +8,0 @@ "dist" |
@@ -13,3 +13,3 @@ # i17n | ||
- ✅ interpolated values `t('Hello, {name}!', { name: 'Drew' })` | ||
- ✅ count based translations `t('tree', { count: 1 }) // "tree"`, `t('tree', { count: 10 }) // "trees"` | ||
- ✅ count based translations `t('tree', { n: 1 }) // "tree"`, `t('tree', { n: 10 }) // "trees"` | ||
- ✅ smart caching - after a key is resolved once it is read from a cache | ||
@@ -111,2 +111,3 @@ - ✅ extending core translations | ||
| `cache` | Optionally pass a prebuilt cache of the resolved `{ key: value }` pairs. | | ||
| `countKey` | Optionally customize the count key. Defaults to `n` (`$t('user', { n: 1 })`) | | ||
@@ -156,4 +157,4 @@ ### API | ||
```ts | ||
i17n.t('withCounts.mouse', { count: 1 }) // "Mouse" | ||
i17n.t('withCounts.mouse', { count: 10 }) // "Mice" | ||
i17n.t('withCounts.mouse', { n: 1 }) // "Mouse" | ||
i17n.t('withCounts.mouse', { n: 10 }) // "Mice" | ||
``` | ||
@@ -160,0 +161,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
19707
260
0