New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.3 to 0.0.4

2

package.json

@@ -5,3 +5,3 @@ {

"type": "module",
"version": "0.0.3",
"version": "0.0.4",
"files": [

@@ -8,0 +8,0 @@ "dist"

@@ -9,3 +9,3 @@ # i17n

- ✅ basic `{ "key": "value" }` translations `t('hello.world')`
- ✅ basic `{ "key": "value" }` translations `t('key')`
- ✅ interpolated values `t('Hello, {name}!', { name: 'Drew' })`

@@ -28,3 +28,3 @@ - ✅ count based translations `t('tree', { count: 1 }) // "tree"`, `t('tree', { count: 10 }) // "trees"`

```bash
npm i @drewjbartlett/i17n
npm i @drewjbartlett/i17n --save
```

@@ -36,3 +36,2 @@

```json
// translations.json
{

@@ -50,3 +49,3 @@ "helloWorld": "Hello World!",

},
};
}
```

@@ -79,14 +78,22 @@

const i17n = createI17n({
export const i17n = createI17n({
translations: Translations,
});
// another-file.ts
import { i17n } from 'path/to/i17n'
i17n.t('helloWorld'); // "Hello World"
```
/**
* Optionally, export your own helpers to match your coding conventions.
*/
```ts
// Optionally, export your own helpers to match your conventions.
const $t = i18n.t;
export { $t }
// another-file.ts
import { $t } from 'path/to/i17n'
$t('helloWorld')
```

@@ -93,0 +100,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