Skip to content

feat: encapsulate unified cookie utility based on js-cookie#108

Merged
liuxy0551 merged 2 commits into
DTStack:masterfrom
jin-sir:feat_cookies
May 27, 2026
Merged

feat: encapsulate unified cookie utility based on js-cookie#108
liuxy0551 merged 2 commits into
DTStack:masterfrom
jin-sir:feat_cookies

Conversation

@jin-sir
Copy link
Copy Markdown
Collaborator

@jin-sir jin-sir commented May 26, 2026

描述

js-cookie 不支持批量清理 cookie,故基于 js-cookie 封装一个工具方法:Cookies 。
Cookies 支持:

  • set:设置 Cookie,并自动合并默认配置;
  • get:读取指定名称的 Cookie 值;不传名称时返回所有 Cookie;
  • remove:删除指定名称的 Cookie,并自动合并默认配置;
  • clear:清除 Cookie,可以选择性保留特定键;

@jin-sir jin-sir requested a review from liuxy0551 May 26, 2026 07:32
Comment thread src/cookies/__test__/index.test.ts Outdated
Comment thread docs/api/classes/Cookies.md
Comment thread src/cookies/index.ts
Comment thread src/cookies/index.ts Outdated
Comment thread src/cookies/index.ts Outdated
Comment thread src/cookies/index.ts Outdated
@liuxy0551 liuxy0551 merged commit af56460 into DTStack:master May 27, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants