Comparing version 1.0.3 to 1.0.4
{ | ||
"name": "http-msgs", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Node module to handle to HTTP status codes", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
# http-msgs | ||
Node module to handle to HTTP status codes | ||
![verson](https://img.shields.io/badge/version-1.0.3-green.svg) | ||
![verson](https://img.shields.io/badge/version-1.0.4-green.svg) | ||
![License](https://img.shields.io/badge/License-MIT-yellowgreen.svg) | ||
@@ -6,0 +6,0 @@ |
@@ -25,14 +25,20 @@ /* | ||
var cookies = req.headers.cookie; | ||
var cookieArray = cookies.split(";"); | ||
for (let index = 0; index < cookieArray.length; index++) { | ||
var curJson = queryString.parse(cookieArray[index]); | ||
var key = Object.keys(curJson); | ||
if (key[0].trim() == curCookie){ | ||
return curJson[key[0]]; | ||
if(util.isUndefined(cookies)){ | ||
return ""; | ||
}else{ | ||
var cookieArray = cookies.split(";"); | ||
for (let index = 0; index < cookieArray.length; index++) { | ||
var curJson = queryString.parse(cookieArray[index]); | ||
var key = Object.keys(curJson); | ||
if (key[0].trim() == curCookie){ | ||
return curJson[key[0]]; | ||
} | ||
} | ||
} | ||
} | ||
exports.getCookie = getCookie; | ||
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
10931
12
191