Socket
Socket
Sign inDemoInstall

react-intl

Package Overview
Dependencies
Maintainers
8
Versions
331
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-intl - npm Package Compare versions

Comparing version 6.2.10 to 6.3.0

5

lib/src/components/injectIntl.d.ts
import * as React from 'react';
import { IntlShape } from '../types';
declare global {
interface Window {
__REACT_INTL_CONTEXT__: React.Context<IntlShape> | undefined;
}
}
export declare const Provider: React.Provider<IntlShape>;

@@ -4,0 +9,0 @@ export declare const Context: React.Context<IntlShape>;

8

lib/src/components/injectIntl.js

@@ -8,4 +8,8 @@ import { __assign } from "tslib";

}
// TODO: We should provide initial value here
var IntlContext = React.createContext(null);
// This is primarily dealing with packaging systems where multiple copies of react-intl
// might exist
var IntlContext = typeof window !== 'undefined'
? window.__REACT_INTL_CONTEXT__ ||
(window.__REACT_INTL_CONTEXT__ = React.createContext(null))
: React.createContext(null);
var IntlConsumer = IntlContext.Consumer, IntlProvider = IntlContext.Provider;

@@ -12,0 +16,0 @@ export var Provider = IntlProvider;

{
"name": "react-intl",
"version": "6.2.10",
"version": "6.3.0",
"description": "Internationalize React apps. This library provides React components and an API to format dates, numbers, and strings, including pluralization and handling translations.",

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

import * as React from 'react';
import { IntlShape } from '../types';
declare global {
interface Window {
__REACT_INTL_CONTEXT__: React.Context<IntlShape> | undefined;
}
}
export declare const Provider: React.Provider<IntlShape>;

@@ -4,0 +9,0 @@ export declare const Context: React.Context<IntlShape>;

@@ -11,4 +11,8 @@ "use strict";

}
// TODO: We should provide initial value here
var IntlContext = React.createContext(null);
// This is primarily dealing with packaging systems where multiple copies of react-intl
// might exist
var IntlContext = typeof window !== 'undefined'
? window.__REACT_INTL_CONTEXT__ ||
(window.__REACT_INTL_CONTEXT__ = React.createContext(null))
: React.createContext(null);
var IntlConsumer = IntlContext.Consumer, IntlProvider = IntlContext.Provider;

@@ -15,0 +19,0 @@ exports.Provider = IntlProvider;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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