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

namirasoft-core

Package Overview
Dependencies
Maintainers
1
Versions
148
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

namirasoft-core - npm Package Compare versions

Comparing version 1.3.40 to 1.3.41

3

dist/IStorageCookie.d.ts
import { IStorage } from "./IStorage";
export declare class IStorageCookie extends IStorage {
private fixed;
private cookies?;
constructor(fixed: {
[name: string]: string;
});
}, cookies?: string);
private getAll;

@@ -8,0 +9,0 @@ get(name: string, defaultValue: string): string;

@@ -7,13 +7,14 @@ "use strict";

class IStorageCookie extends IStorage_1.IStorage {
constructor(fixed) {
constructor(fixed, cookies) {
super();
this.fixed = fixed;
this.cookies = cookies;
}
getAll() {
var _a;
var _a, _b;
let ans = {};
let items = document.cookie.split(";");
let items = ((_a = this.cookies) !== null && _a !== void 0 ? _a : document.cookie).split(";");
for (let i = 0; i < items.length; i++) {
const ops = items[i].split("=");
ans[ops[0].trim()] = (_a = ops[1]) === null || _a === void 0 ? void 0 : _a.trim();
ans[ops[0].trim()] = (_b = ops[1]) === null || _b === void 0 ? void 0 : _b.trim();
}

@@ -20,0 +21,0 @@ return ans;

@@ -11,3 +11,3 @@ {

"private": false,
"version": "1.3.40",
"version": "1.3.41",
"author": "Amir Abolhasani",

@@ -14,0 +14,0 @@ "license": "MIT",

@@ -7,6 +7,8 @@ import { EncodingOperation } from "./EncodingOperation";

private fixed: { [name: string]: string };
constructor(fixed: { [name: string]: string })
private cookies?: string;
constructor(fixed: { [name: string]: string }, cookies?: string)
{
super();
this.fixed = fixed;
this.cookies = cookies;
}

@@ -16,3 +18,3 @@ private getAll(): { [name: string]: string }

let ans: { [name: string]: string } = {};
let items = document.cookie.split(";");
let items = (this.cookies ?? document.cookie).split(";");
for (let i = 0; i < items.length; i++)

@@ -19,0 +21,0 @@ {

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