Socket
Socket
Sign inDemoInstall

i18next-express-middleware

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

i18next-express-middleware - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

11

lib/index.js

@@ -32,6 +32,6 @@ 'use strict';

return function (req, res, next) {
var ignores = options.ignoreRoutes || [];
ignores.forEach(function (ignore) {
if (req.path.indexOf(ignore) > -1) return next();
});
var ignores = options.ignoreRoutes instanceof Array && options.ignoreRoutes || [];
for (var i = 0; i < ignores.length; i++) {
if (req.path.indexOf(ignores[i]) > -1) return next();
}

@@ -73,3 +73,4 @@ var lng = req.lng;

changeLanguage: function changeLanguage(lng) {
req.lng = lng;
req.language = req.locale = req.lng = lng;
req.languages = i18next.services.languageUtils.toResolveHierarchy(lng);
},

@@ -76,0 +77,0 @@ language: lng

{
"name": "i18next-express-middleware",
"version": "0.3.1",
"version": "0.3.2",
"description": "express middleware for i18next",

@@ -19,11 +19,11 @@ "main": "./lib/index.js",

"dependencies": {
"cookies": "0.5.1",
"cookies": "0.6.1",
"json5": "0.4.0"
},
"devDependencies": {
"babel-cli": "6.0.0",
"babel-core": "6.4.5",
"babel-eslint": "5.0.0-beta6",
"babel-cli": "6.5.1",
"babel-core": "6.5.2",
"babel-eslint": "5.0.0",
"babel-preset-es2015": "6.3.13",
"babel-preset-stage-0": "6.3.13",
"babel-preset-stage-0": "6.5.0",
"chai": "2.3.0",

@@ -30,0 +30,0 @@ "eslint": "1.2.1",

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