承接 alorel/alo-cookie 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

alorel/alo-cookie

最新稳定版本:1.1

Composer 安装命令:

composer create-project alorel/alo-cookie

包简介

A simple JavaScript cookie manager

README 文档

README

Logo

License

What is this sorcery ?

It's a simple class to manipulate cookies in an object-oriented manner.

Usage

Get all document cookies

var cookies = AloCookie.getAll();
// {name1:value1, name2:value2 ...}

Setting cookie "foo"

var cookie = new AloCookie("foo");
cookie.value = "bar";
cookie.expire = 3600; //in 1 hour. Defaults to expire at the end of the session
cookie.domain = "www.example.com"; //defaults to window.location.hostname
cookie.path = "/cart/checkout"; // Defaults to "/"
cookie.secure = true; // true sends the cookie only via HTTPS. Defaults to window.location.protocol == "https:"
cookie.save()

Check if cookie called "foo" exists

var cookie = new AloCookie("foo"),
cookieExists = cookie.exists();

Deleting cookie "foo"

var cookie = new AloCookie("foo");
cookie.remove();

统计信息

  • 总下载量: 186
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • 开发语言: HTML

其他信息

  • 授权协议: GPL-3.0
  • 更新时间: 2015-07-13