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

i18next-conv

Package Overview
Dependencies
Maintainers
2
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

i18next-conv - npm Package Compare versions

Comparing version 2.1.1 to 2.2.0

11

lib/flatten.js

@@ -14,3 +14,4 @@ function regexIndexOf(value, regex, startpos) {

var flat = {}
, separator = options.keyseparator || '##';
, separator = options.keyseparator || '##'
, ctxSeparator = options.ctxSeparator || '_';

@@ -52,6 +53,6 @@ function recurse(appendTo, obj, parentKey) {

ctxKey = ctxKey.substring(0, pluralIndex);
if (ctxKey.indexOf('_') > -1) context = ctxKey.substring(ctxKey.lastIndexOf('_') + 1, ctxKey.length);
if (ctxKey.indexOf(ctxSeparator) > -1) context = ctxKey.substring(ctxKey.lastIndexOf(ctxSeparator) + 1, ctxKey.length);
}
else if (key.indexOf('_') > -1) {
context = ctxKey.substring(ctxKey.lastIndexOf('_') + 1, ctxKey.length);
else if (key.indexOf(ctxSeparator) > -1) {
context = ctxKey.substring(ctxKey.lastIndexOf(ctxSeparator) + 1, ctxKey.length);
}

@@ -64,3 +65,3 @@ else {

if (context !== '') key = key.replace('_' + context, '');
if (context !== '') key = key.replace(ctxSeparator + context, '');

@@ -67,0 +68,0 @@ // append or recurse

@@ -9,3 +9,3 @@ {

],
"version": "2.1.1",
"version": "2.2.0",
"private": false,

@@ -12,0 +12,0 @@ "preferGlobal": "true",

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