namirasoft-core
Advanced tools
Comparing version 1.3.38 to 1.3.39
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.IStorageCookie = void 0; | ||
const EncodingOperation_1 = require("./EncodingOperation"); | ||
const IStorage_1 = require("./IStorage"); | ||
@@ -22,3 +23,3 @@ class IStorageCookie extends IStorage_1.IStorage { | ||
var _a; | ||
return (_a = this.getAll()[name]) !== null && _a !== void 0 ? _a : defaultValue; | ||
return (_a = EncodingOperation_1.EncodingOperation.Base64Decode(this.getAll()[name])) !== null && _a !== void 0 ? _a : defaultValue; | ||
} | ||
@@ -29,3 +30,3 @@ set(name, value) { | ||
items.push(`${key}=${this.fixed[key]}`); | ||
items.push(`${name}=${value}`); | ||
items.push(`${name}=${EncodingOperation_1.EncodingOperation.Base64Encode(value)}`); | ||
document.cookie = items.join(";"); | ||
@@ -32,0 +33,0 @@ } |
@@ -11,3 +11,3 @@ { | ||
"private": false, | ||
"version": "1.3.38", | ||
"version": "1.3.39", | ||
"author": "Amir Abolhasani", | ||
@@ -14,0 +14,0 @@ "license": "MIT", |
@@ -0,1 +1,2 @@ | ||
import { EncodingOperation } from "./EncodingOperation"; | ||
import { IStorage } from "./IStorage"; | ||
@@ -24,3 +25,3 @@ | ||
{ | ||
return this.getAll()[name] ?? defaultValue; | ||
return EncodingOperation.Base64Decode(this.getAll()[name]) ?? defaultValue; | ||
} | ||
@@ -32,3 +33,3 @@ override set(name: string, value: string) | ||
items.push(`${key}=${this.fixed[key]}`); | ||
items.push(`${name}=${value}`); | ||
items.push(`${name}=${EncodingOperation.Base64Encode(value)}`); | ||
document.cookie = items.join(";"); | ||
@@ -35,0 +36,0 @@ } |
Sorry, the diff of this file is not supported yet
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
349232
4381