Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@drewjbartlett/i17n

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@drewjbartlett/i17n - npm Package Compare versions

Comparing version 0.0.18 to 0.0.19

2

package.json

@@ -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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc