New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@solid-primitives/i18n

Package Overview
Dependencies
Maintainers
2
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@solid-primitives/i18n - npm Package Compare versions

Comparing version 0.0.105 to 0.0.250

4

dist/index.d.ts

@@ -35,3 +35,3 @@ /**

dict: (lang: string) => Record<string, Record<string, any>>;
}] | undefined>;
}]>;
export declare const useI18n: () => [template: (key: string, params?: Record<string, string> | undefined, defaultValue?: string | undefined) => any, actions: {

@@ -41,3 +41,3 @@ add(lang: string, table: Record<string, any>): void;

dict: (lang: string) => Record<string, Record<string, any>>;
}] | undefined;
}];
export {};

@@ -140,3 +140,3 @@ import { createSignal, createContext, useContext } from "solid-js";

};
export const I18nContext = createContext();
export const I18nContext = createContext({});
export const useI18n = () => useContext(I18nContext);
{
"name": "@solid-primitives/i18n",
"version": "0.0.105",
"version": "0.0.250",
"description": "Primitive to create and use i18n primitives.",

@@ -5,0 +5,0 @@ "author": "Alexandre Mouton-Brady <amoutonbrady@gmail.com>",

@@ -18,5 +18,5 @@ # @solid-primitives/i18n

```tsx
import { render } from "solid-js/dom";
import { render } from "solid-js/web";
import { Component, createSignal } from "solid-js";
import { I18nProvider, useI18n } from "@amoutonbrady/solid-i18n";
import { I18nProvider, createI18nContext, useI18n } from "@solid-primitives/solid-i18n";

@@ -57,8 +57,9 @@ const App: Component = () => {

};
const value = createI18nContext(dict, "fr");
render(
() => (
<I18nProvider dict={dict} locale="fr">
<I18nContext.Provider value={value}>
<App />
</I18nProvider>
</I18nContext.Provider>
),

@@ -65,0 +66,0 @@ document.getElementById("app")

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