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.35 to 1.3.36

1

dist/IStorageCookie.d.ts

@@ -8,3 +8,2 @@ import { IStorage } from "./IStorage";

private getAll;
private setAll;
get(name: string, defaultValue: string): string;

@@ -11,0 +10,0 @@ set(name: string, value: string): void;

25

dist/IStorageCookie.js

@@ -11,20 +11,11 @@ "use strict";

getAll() {
var _a;
let ans = {};
for (let key of Object.keys(this.fixed))
ans[key] = this.fixed[key];
let items = document.cookie.split(";");
for (let i = 0; i < items.length; i++) {
const ops = items[i].split("=");
ans[ops[0]] = ops[1];
ans[ops[0].trim()] = (_a = ops[1]) === null || _a === void 0 ? void 0 : _a.trim();
}
return ans;
}
setAll(obj) {
for (let key of Object.keys(this.fixed))
obj[key] = this.fixed[key];
let items = [];
for (let key of Object.keys(obj))
items.push(`${key}=${obj[key]}`);
document.cookie = items.join(";");
}
get(name, defaultValue) {

@@ -35,10 +26,10 @@ var _a;

set(name, value) {
let all = this.getAll();
all[name] = value;
this.setAll(all);
let items = [];
for (let key of Object.keys(this.fixed))
items.push(`${key}=${this.fixed[key]}`);
items.push(`${name}=${value}`);
document.cookie = items.join(";");
}
del(name) {
let all = this.getAll();
delete all[name];
this.setAll(all);
this.set(name, "");
}

@@ -45,0 +36,0 @@ }

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

"private": false,
"version": "1.3.35",
"version": "1.3.36",
"author": "Amir Abolhasani",

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

@@ -14,4 +14,2 @@ import { IStorage } from "./IStorage";

let ans: { [name: string]: string } = {};
for (let key of Object.keys(this.fixed))
ans[key] = this.fixed[key];
let items = document.cookie.split(";");

@@ -21,15 +19,6 @@ for (let i = 0; i < items.length; i++)

const ops = items[i].split("=");
ans[ops[0]] = ops[1];
ans[ops[0].trim()] = ops[1]?.trim();
}
return ans;
}
private setAll(obj: { [name: string]: string })
{
for (let key of Object.keys(this.fixed))
obj[key] = this.fixed[key];
let items = [];
for (let key of Object.keys(obj))
items.push(`${key}=${obj[key]}`);
document.cookie = items.join(";");
}
override get(name: string, defaultValue: string)

@@ -41,12 +30,12 @@ {

{
let all = this.getAll();
all[name] = value;
this.setAll(all);
let items = [];
for (let key of Object.keys(this.fixed))
items.push(`${key}=${this.fixed[key]}`);
items.push(`${name}=${value}`);
document.cookie = items.join(";");
}
override del(name: string)
{
let all = this.getAll();
delete all[name];
this.setAll(all);
this.set(name, "");
}
}

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