Socket
Socket
Sign inDemoInstall

@lingui/core

Package Overview
Dependencies
Maintainers
3
Versions
147
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lingui/core - npm Package Compare versions

Comparing version 4.0.0-next.2 to 4.0.0-next.3

23

./build/cjs/index.js

@@ -231,2 +231,25 @@ 'use strict';

}
/**
* @param locales one locale or array of locales.
* If array of locales is passed they would be used as fallback
* locales for date and number formatting
* @param messages compiled message catalog
* @param notify Should emit `change` event for all subscribers.
* This is useful for integration with frameworks as NextJS to avoid race-conditions during initialization.
*/
loadAndActivate(locales, messages) {
let notify = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
if (Array.isArray(locales)) {
this._locale = locales[0];
this._locales = locales;
} else {
this._locale = locales;
this._locales = null;
}
this._messages[this._locale] = messages;
if (notify) {
this.emit("change");
}
}
activate(locale, locales) {

@@ -233,0 +256,0 @@ if (process.env.NODE_ENV !== "production") {

@@ -231,2 +231,25 @@ 'use strict';

}
/**
* @param locales one locale or array of locales.
* If array of locales is passed they would be used as fallback
* locales for date and number formatting
* @param messages compiled message catalog
* @param notify Should emit `change` event for all subscribers.
* This is useful for integration with frameworks as NextJS to avoid race-conditions during initialization.
*/
loadAndActivate(locales, messages) {
let notify = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
if (Array.isArray(locales)) {
this._locale = locales[0];
this._locales = locales;
} else {
this._locale = locales;
this._locales = null;
}
this._messages[this._locale] = messages;
if (notify) {
this.emit("change");
}
}
activate(locale, locales) {

@@ -233,0 +256,0 @@ if (process.env.NODE_ENV !== "production") {

@@ -229,2 +229,25 @@ import { compileMessage } from '@lingui/core/compile';

}
/**
* @param locales one locale or array of locales.
* If array of locales is passed they would be used as fallback
* locales for date and number formatting
* @param messages compiled message catalog
* @param notify Should emit `change` event for all subscribers.
* This is useful for integration with frameworks as NextJS to avoid race-conditions during initialization.
*/
loadAndActivate(locales, messages) {
let notify = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
if (Array.isArray(locales)) {
this._locale = locales[0];
this._locales = locales;
} else {
this._locale = locales;
this._locales = null;
}
this._messages[this._locale] = messages;
if (notify) {
this.emit("change");
}
}
activate(locale, locales) {

@@ -231,0 +254,0 @@ if (process.env.NODE_ENV !== "production") {

@@ -87,2 +87,11 @@ declare class EventEmitter<Events extends {

load(locale: Locale, messages: Messages): void;
/**
* @param locales one locale or array of locales.
* If array of locales is passed they would be used as fallback
* locales for date and number formatting
* @param messages compiled message catalog
* @param notify Should emit `change` event for all subscribers.
* This is useful for integration with frameworks as NextJS to avoid race-conditions during initialization.
*/
loadAndActivate(locales: Locale | Locales, messages: Messages, notify?: boolean): void;
activate(locale: Locale, locales?: Locales): void;

@@ -89,0 +98,0 @@ _(id: MessageDescriptor | string, values?: Values | undefined, { message, formats }?: MessageOptions | undefined): string;

4

package.json
{
"name": "@lingui/core",
"version": "4.0.0-next.2",
"version": "4.0.0-next.3",
"sideEffects": false,

@@ -68,3 +68,3 @@ "description": "I18n tools for javascript",

},
"gitHead": "556ab57e20c2ac9d384a22424c6a90c2ba0dd133"
"gitHead": "29cad1bdcc781994ac4d496e5c4937795423d405"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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