New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hcode-core

Package Overview
Dependencies
Maintainers
2
Versions
633
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hcode-core - npm Package Compare versions

Comparing version 0.0.74 to 0.0.75

2

build/functions/getCookies/index.d.ts
import { AnyObject } from '../../interfaces/anyObject';
export declare function getCookies(cookies: string | undefined): AnyObject;
export declare function getCookies(cookies: string | undefined, field?: any): AnyObject;

@@ -86,3 +86,4 @@ function base64Encode(value) {

function getCookies(cookies) {
function getCookies(cookies, field) {
if (field === void 0) { field = null; }
if (!cookies) {

@@ -97,3 +98,8 @@ return {};

.forEach(function (item) { return (data_1[item[0]] = item[1]); });
return data_1;
if (field && data_1[field]) {
return data_1[field];
}
else {
return data_1;
}
}

@@ -100,0 +106,0 @@ }

@@ -90,3 +90,4 @@ 'use strict';

function getCookies(cookies) {
function getCookies(cookies, field) {
if (field === void 0) { field = null; }
if (!cookies) {

@@ -101,3 +102,8 @@ return {};

.forEach(function (item) { return (data_1[item[0]] = item[1]); });
return data_1;
if (field && data_1[field]) {
return data_1[field];
}
else {
return data_1;
}
}

@@ -104,0 +110,0 @@ }

{
"name": "hcode-core",
"version": "0.0.74",
"version": "0.0.75",
"description": "Hcode Core",

@@ -5,0 +5,0 @@ "main": "build/index.js",

import { AnyObject } from '../../interfaces/anyObject';
export function getCookies(cookies: string | undefined): AnyObject {
export function getCookies(
cookies: string | undefined,
field = null
): AnyObject {
if (!cookies) {

@@ -12,4 +15,8 @@ return {};

.forEach((item) => (data[item[0]] = item[1]));
return data;
if (field && data[field]) {
return data[field];
} else {
return data;
}
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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