i18next-http-middleware
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -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.", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
64636
1358