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

@alicloud/cookie

Package Overview
Dependencies
Maintainers
0
Versions
123
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@alicloud/cookie - npm Package Compare versions

Comparing version 1.6.0 to 1.6.1

5

build/cjs/util/delete-cookie.js
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {

@@ -8,3 +7,3 @@ value: true

exports.default = deleteCookie;
var _setCookie = _interopRequireDefault(require("./set-cookie"));
var _setCookie2 = require("./set-cookie");
/**

@@ -18,3 +17,3 @@ * 删除 cookie,其实设置一个过期时间为此刻之前的时间,浏览器会自动清理过期的 cookie(其实这里设不设值都无所谓)

partitioned = _ref.partitioned;
(0, _setCookie.default)(name, '', {
(0, _setCookie2._setCookie)(name, '', {
domain: domain,

@@ -21,0 +20,0 @@ path: path,

1

build/cjs/util/set-cookie.js

@@ -7,2 +7,3 @@ "use strict";

});
exports._setCookie = _setCookie;
exports.default = setCookie;

@@ -9,0 +10,0 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));

@@ -1,2 +0,2 @@

import setCookie from './set-cookie';
import { _setCookie } from './set-cookie';

@@ -11,3 +11,3 @@ /**

partitioned = _ref.partitioned;
setCookie(name, '', {
_setCookie(name, '', {
domain: domain,

@@ -14,0 +14,0 @@ path: path,

@@ -30,3 +30,3 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";

*/
function _setCookie(name, value) {
export function _setCookie(name, value) {
var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},

@@ -33,0 +33,0 @@ _ref$domain = _ref.domain,

import { ICookieSetOptions } from '../types';
/**
* 设置 cookie,默认为时间为 180 天,设置 extra.days 为 0 可以保存为 session cookie
*
* HTTP 下,非 Iframe、Iframe 不跨域、Iframe 跨子域(跨全域都不行)成功的测试用例:
*
* | SameSite | Secure | Firefox | Chrome | Safari |
* |--------------|-------------|---------|--------|--------|
* | `undefined` | `undefined` | ✅ | ✅ | ✅ |
* | Lax | `undefined` | ✅ | ✅ | ✅ |
* | Strict | `undefined` | ✅ | ✅ | ✅ |
*
* HTTPS 下,非 Iframe、Iframe 不跨域、Iframe 跨子域、Iframe 跨全域(Safari 都不行)成功的测试用例:
*
* | SameSite | Secure | Firefox | Chrome | Safari |
* |--------------|-------------|---------|--------|--------|
* | None | `true` | ✅ | ✅ | ✅ |
* | None | `false` | ✅ | ✅ | ✅ |
*
* 1. 若 HTTPS,则 `sameSite=None; secure=true`
* 2. 若 HTTP,则 `SameSite` 和 `secure` 不设置
*/
export declare function _setCookie(name: string, value: string | number | boolean, { domain, path, days, sameSite: sameSite0, secure: secure0, partitioned: partitioned0 }?: ICookieSetOptions): void;
export default function setCookie(name: string, value: string | number | boolean, options?: ICookieSetOptions): void;
{
"name": "@alicloud/cookie",
"version": "1.6.0",
"version": "1.6.1",
"description": "ConsoleBase Cookie",

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

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