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

react-i18nify

Package Overview
Dependencies
Maintainers
2
Versions
131
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-i18nify - npm Package Compare versions

Comparing version 4.0.1 to 4.1.0

4

build/lib/core.js

@@ -12,3 +12,3 @@ "use strict";

var _formatDistanceToNow = _interopRequireDefault(require("date-fns/formatDistanceToNow"));
var _formatDistanceToNowStrict = _interopRequireDefault(require("date-fns/formatDistanceToNowStrict"));

@@ -175,3 +175,3 @@ var _Base = _interopRequireDefault(require("./Base"));

if (options.dateFormat === 'distance-to-now') {
return (0, _formatDistanceToNow.default)(parsedDate, {
return (0, _formatDistanceToNowStrict.default)(parsedDate, {
addSuffix: true,

@@ -178,0 +178,0 @@ locale: localeObject

{
"name": "react-i18nify",
"version": "4.0.1",
"version": "4.1.0",
"description": "Simple i18n translation and localization components and helpers for React.",

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

@@ -6,3 +6,3 @@ /* eslint global-require: "off" */

import format from 'date-fns/format';
import formatDistanceToNow from 'date-fns/formatDistanceToNow';
import formatDistanceToNowStrict from 'date-fns/formatDistanceToNowStrict';
import BaseComponent from './Base';

@@ -123,3 +123,3 @@ import { fetchTranslation, replace } from './utils';

if (options.dateFormat === 'distance-to-now') {
return formatDistanceToNow(
return formatDistanceToNowStrict(
parsedDate,

@@ -126,0 +126,0 @@ { addSuffix: true, locale: localeObject },

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