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

i18next-http-middleware

Package Overview
Dependencies
Maintainers
2
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

i18next-http-middleware - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

9

cjs/httpFunctions.js

@@ -109,5 +109,8 @@ "use strict";

var setHeader = function setHeader(res, name, value) {
if (typeof res.setHeader === 'function' && !(res._headerSent || res.headersSent)) return res.setHeader(name, value);
if (typeof res.header === 'function') return res.header(name, value);
if (res.headers && typeof res.headers.set === 'function') return res.headers.set(name, value);
if (!(res._headerSent || res.headersSent)) {
if (typeof res.setHeader === 'function') return res.setHeader(name, value);
if (typeof res.header === 'function') return res.header(name, value);
if (res.headers && typeof res.headers.set === 'function') return res.headers.set(name, value);
}
console.log('no possibility found to set header');

@@ -114,0 +117,0 @@ };

@@ -69,5 +69,7 @@ export const getPath = (req) => {

export const setHeader = (res, name, value) => {
if (typeof res.setHeader === 'function' && !(res._headerSent || res.headersSent)) return res.setHeader(name, value)
if (typeof res.header === 'function') return res.header(name, value)
if (res.headers && typeof res.headers.set === 'function') return res.headers.set(name, value)
if (!(res._headerSent || res.headersSent)) {
if (typeof res.setHeader === 'function') return res.setHeader(name, value)
if (typeof res.header === 'function') return res.header(name, value)
if (res.headers && typeof res.headers.set === 'function') return res.headers.set(name, value)
}
console.log('no possibility found to set header')

@@ -74,0 +76,0 @@ }

{
"name": "i18next-http-middleware",
"version": "1.0.4",
"version": "1.0.5",
"private": false,

@@ -20,6 +20,6 @@ "type": "module",

"@babel/cli": "7.8.4",
"@babel/core": "7.9.0",
"@babel/preset-env": "7.9.5",
"@babel/core": "7.9.6",
"@babel/preset-env": "7.9.6",
"babel-plugin-add-module-exports": "1.0.2",
"eslint": "6.8.0",
"eslint": "7.0.0",
"eslint-config-standard": "14.1.1",

@@ -37,3 +37,3 @@ "eslint-plugin-import": "2.20.2",

"supertest": "4.0.2",
"uglify-js": "3.9.1"
"uglify-js": "3.9.2"
},

@@ -40,0 +40,0 @@ "description": "i18next-http-middleware is a middleware to be used with Node.js web frameworks like express or Fastify and also for Deno.",

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