hcode-core
Advanced tools
Comparing version 0.0.75 to 0.0.76
import { AnyObject } from '../../interfaces/anyObject'; | ||
export declare function getCookies(cookies: string | undefined, field?: any): AnyObject; | ||
export declare function getCookies(cookies: string | undefined): AnyObject; |
@@ -86,4 +86,3 @@ function base64Encode(value) { | ||
function getCookies(cookies, field) { | ||
if (field === void 0) { field = null; } | ||
function getCookies(cookies) { | ||
if (!cookies) { | ||
@@ -98,8 +97,3 @@ return {}; | ||
.forEach(function (item) { return (data_1[item[0]] = item[1]); }); | ||
if (field && data_1[field]) { | ||
return data_1[field]; | ||
} | ||
else { | ||
return data_1; | ||
} | ||
return data_1; | ||
} | ||
@@ -106,0 +100,0 @@ } |
@@ -90,4 +90,3 @@ 'use strict'; | ||
function getCookies(cookies, field) { | ||
if (field === void 0) { field = null; } | ||
function getCookies(cookies) { | ||
if (!cookies) { | ||
@@ -102,8 +101,3 @@ return {}; | ||
.forEach(function (item) { return (data_1[item[0]] = item[1]); }); | ||
if (field && data_1[field]) { | ||
return data_1[field]; | ||
} | ||
else { | ||
return data_1; | ||
} | ||
return data_1; | ||
} | ||
@@ -110,0 +104,0 @@ } |
{ | ||
"name": "hcode-core", | ||
"version": "0.0.75", | ||
"version": "0.0.76", | ||
"description": "Hcode Core", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
import { AnyObject } from '../../interfaces/anyObject'; | ||
export function getCookies( | ||
cookies: string | undefined, | ||
field = null | ||
): AnyObject { | ||
export function getCookies(cookies: string | undefined): AnyObject { | ||
if (!cookies) { | ||
@@ -15,8 +12,4 @@ return {}; | ||
.forEach((item) => (data[item[0]] = item[1])); | ||
if (field && data[field]) { | ||
return data[field]; | ||
} else { | ||
return data; | ||
} | ||
return data; | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
69459
1496