🚀 Big News:Socket Has Acquired Secure Annex.Learn More
Socket
Book a DemoSign in
Socket

i18next-fs-backend

Package Overview
Dependencies
Maintainers
2
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

i18next-fs-backend - npm Package Compare versions

Comparing version
2.6.1
to
2.6.2
+4
-0
CHANGELOG.md

@@ -0,1 +1,5 @@

### 2.6.2
- use own interpolation function instead of relying on i18next's interpolator
### 2.6.1

@@ -2,0 +6,0 @@

@@ -9,2 +9,3 @@ "use strict";

exports.getPath = getPath;
exports.interpolate = interpolate;
exports.pushPath = pushPath;

@@ -78,2 +79,9 @@ exports.setPath = setPath;

return obj[k];
}
var interpolationRegexp = /\{\{(.+?)\}\}/g;
function interpolate(str, data) {
return str.replace(interpolationRegexp, function (match, key) {
var value = data[key.trim()];
return value != null ? value : match;
});
}

@@ -67,2 +67,9 @@ var arr = [];

return obj[k];
}
var interpolationRegexp = /\{\{(.+?)\}\}/g;
export function interpolate(str, data) {
return str.replace(interpolationRegexp, function (match, key) {
var value = data[key.trim()];
return value != null ? value : match;
});
}

@@ -71,1 +71,9 @@ const arr = []

}
const interpolationRegexp = /\{\{(.+?)\}\}/g
export function interpolate (str, data) {
return str.replace(interpolationRegexp, (match, key) => {
const value = data[key.trim()]
return value != null ? value : match
})
}
+2
-2
{
"name": "i18next-fs-backend",
"version": "2.6.1",
"version": "2.6.2",
"private": false,

@@ -45,3 +45,3 @@ "type": "module",

"expect.js": "0.3.1",
"i18next": "24.0.0",
"i18next": "26.0.3",
"js-yaml": "4.1.1",

@@ -48,0 +48,0 @@ "jsonc-parser": "3.3.1",

Sorry, the diff of this file is not supported yet