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

react-intl-universal

Package Overview
Dependencies
Maintainers
1
Versions
138
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-intl-universal - npm Package Compare versions

Comparing version 1.8.4 to 1.9.1

13

lib/index.js

@@ -73,3 +73,4 @@ /*

pt: "https://g.alicdn.com/react-intl-universal/locale-data/1.0.0/pt.js",
it: "https://g.alicdn.com/react-intl-universal/locale-data/1.0.0/it.js"
it: "https://g.alicdn.com/react-intl-universal/locale-data/1.0.0/it.js",
ru: "https://g.alicdn.com/react-intl-universal/locale-data/1.0.0/ru.js"
};

@@ -276,3 +277,13 @@

}
/**
* Load more locales after init
*/
}, {
key: "load",
value: function load$$1(locales) {
Object.assign(this.options.locales, locales);
}
}, {
key: "getLocaleFromCookie",

@@ -279,0 +290,0 @@ value: function getLocaleFromCookie(options) {

2

package.json
{
"name": "react-intl-universal",
"version": "1.8.4",
"version": "1.9.1",
"description": "Internationalize React apps. Not only for React.Component but also for Vanilla JS.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -76,3 +76,3 @@ # react-intl-universal

```
Furthermore, your React.Component's properties is not inherited in subclass since component is injected by [react-intl](https://github.com/yahoo/react-intl).
Furthermore, your React.Component's properties are not inherited in subclass since component is injected by [react-intl](https://github.com/yahoo/react-intl).

@@ -161,3 +161,3 @@ Due to the problem above, we create [react-intl-universal](https://www.npmjs.com/package/react-intl-universal) to internationalize React app using simple but powerful API.

And `getHTML` also support default message.
And `getHTML` also supports default message.
```js

@@ -169,3 +169,3 @@ intl.getHTML('not-exist-key').d(<div>hello</div>) // React.Element with "<div>hello</div>"

### Message With Variables
If the message contains variables, the `{variable_name}` is substituted directly into the string. In the example below, there are two variables `{name}` and `{where}`, the second argument representing the variables in `get` method are substituted into the string.
If the message contains variables the `{variable_name}` is substituted directly into the string. In the example below, there are two variables `{name}` and `{where}`, the second argument representing the variables in `get` method are substituted into the string.

@@ -172,0 +172,0 @@ Locale data:

@@ -76,2 +76,8 @@ declare module "react-intl-universal" {

/**
* Load more locales after init
* @param {Object} locales App locale data
*/
export function load(locales: { [key: string]: any }): void;
export interface ReactIntlUniversalOptions {

@@ -78,0 +84,0 @@ currentLocale?: string;

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