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

react-localize

Package Overview
Dependencies
Maintainers
3
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-localize - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

4

build/Localization.js

@@ -58,4 +58,4 @@ 'use strict';

},
localize: function localize(key) {
var values = arguments.length <= 1 || arguments[1] === undefined ? [] : arguments[1];
localize: function localize(key, values) {
values = values || [];
var _props = this.props;

@@ -62,0 +62,0 @@ var messages = _props.messages;

@@ -7,2 +7,6 @@ # Change Log

## 1.1.1 2016-08-02
### Fixed
- Bug to handle passing `null` to `localize('label', null)` more gracefully
## 1.1.0 2016-08-02

@@ -9,0 +13,0 @@ ### Added

{
"name": "react-localize",
"version": "1.1.0",
"version": "1.1.1",
"description": "A simple context wrapper and text localization component for localizing strings",

@@ -5,0 +5,0 @@ "main": "build/index.js",

@@ -35,3 +35,4 @@ import defaultLocalizer from './util/localize-formatter';

localize(key, values=[]) {
localize(key, values) {
values = values || [];
const { messages, xLocale } = this.props;

@@ -38,0 +39,0 @@

@@ -89,2 +89,16 @@ import Chai from 'chai';

it('ignores provided values if is null', () => {
const messages = {
'thisMessage': 'thatMessage'
};
let output = ReactDOMServer.renderToString(
<Localization messages={messages}>
<BasicElement customMessage='thisMessage' values={null}/>
</Localization>
);
expect(output).to.include('>thatMessage<');
});
it('adds a data key when localize is in debug mode', () => {

@@ -91,0 +105,0 @@ const messages = {

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