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

i18n-js

Package Overview
Dependencies
Maintainers
2
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

i18n-js - npm Package Compare versions

Comparing version 3.2.1 to 3.2.2

20

app/assets/javascripts/i18n.js

@@ -618,3 +618,3 @@ // I18n.js

I18n.interpolate = function(message, options) {
if (message === null) {
if (message == null) {
return message;

@@ -837,4 +837,8 @@ }

var matches, convertedDate, fraction;
// A date input of `null` or `undefined` will be returned as-is
if (date == null) {
return date;
}
// we have a date, so just return it.
if (typeof(date) == "object") {
if (typeof(date) === "object") {
return date;

@@ -985,8 +989,14 @@ }

if (date.toString().match(/invalid/i)) {
return date.toString();
// A date input of `null` or `undefined` will be returned as-is
if (date == null) {
return date;
}
var date_string = date.toString()
if (date_string.match(/invalid/i)) {
return date_string;
}
if (!format) {
return date.toString();
return date_string;
}

@@ -993,0 +1003,0 @@

@@ -21,2 +21,10 @@ # Change Log

## [3.2.2] - 2019-05-09
### Fixed
- [JS] Return invalid date/time input values (null & undefined) as-is
(Commit: https://github.com/fnando/i18n-js/commit/869d1689ed788ff50121de492db354652971c23d)
## [3.2.1] - 2019-01-22

@@ -381,3 +389,4 @@

[Unreleased]: https://github.com/fnando/i18n-js/compare/v3.2.1...HEAD
[Unreleased]: https://github.com/fnando/i18n-js/compare/v3.2.2...HEAD
[3.2.2]: https://github.com/fnando/i18n-js/compare/v3.2.1...v3.2.2
[3.2.1]: https://github.com/fnando/i18n-js/compare/v3.2.0...v3.2.1

@@ -384,0 +393,0 @@ [3.2.0]: https://github.com/fnando/i18n-js/compare/v3.1.0...v3.2.0

{
"name": "i18n-js",
"version": "3.2.1",
"version": "3.2.2",
"description": "A javascript library similar to Ruby on Rails i18n gem",

@@ -5,0 +5,0 @@ "author": "Nando Vieira",

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