Socket
Socket
Sign inDemoInstall

@nanostores/i18n

Package Overview
Dependencies
Maintainers
3
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nanostores/i18n - npm Package Compare versions

Comparing version 0.1.1 to 0.2.0

processor/index.d.ts

2

create-i18n/index.d.ts
import { ReadableAtom } from 'nanostores'
import { LocaleStore } from '../locale-from/index.js'
import { Processor } from '../processor/index.js'

@@ -73,3 +74,4 @@ export type TranslationJSON = string | TranslationsJSON

get: TranslationLoader<Locale>
processors?: Processor[]
}
): I18n<Locale>

@@ -5,2 +5,3 @@ import { atom, onMount } from 'nanostores'

let baseLocale = opts.baseLocale || 'en'
let processors = opts.processors || []
let loading = atom(true)

@@ -66,2 +67,7 @@

})
for (let i in processors) {
processors[i].from.listen(() => {
setTranslation(locale.get())
})
}
return () => {

@@ -68,0 +74,0 @@ unbindLocale()

@@ -17,4 +17,5 @@ export {

export { count, CountInput } from './count/index.js'
export { createProcessor } from './processor/index.js'
export { messagesToJSON } from './messages-to-json/index.js'
export { browser } from './browser/index.js'
export { params } from './params/index.js'
export { transform, strings } from './transforms/index.js'
export { createProcessor } from './processor/index.js'
export { messagesToJSON } from './messages-to-json/index.js'

@@ -3,0 +4,0 @@ export { createI18n } from './create-i18n/index.js'

4

package.json
{
"name": "@nanostores/i18n",
"version": "0.1.1",
"description": "A tiny (<500 bytes) i18n library for React/Preact/Vue/Svelte",
"version": "0.2.0",
"description": "A tiny (≈500 bytes) i18n library for React/Preact/Vue/Svelte",
"keywords": [

@@ -6,0 +6,0 @@ "nano",

@@ -57,3 +57,3 @@ # Nano Stores I18n

export const i18n = createI18n({
export const i18n = createI18n(locale, {
get (code) {

@@ -60,0 +60,0 @@ return fetchJSON(`/translations/${code}.json`)

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