Comparing version 3.0.0 to 3.0.1
@@ -5,4 +5,8 @@ # Changelog | ||
## [3.0.0] (2021-06-29) | ||
## 3.0.1 - 2024-05-26 | ||
The package repository has moved and it's now reflected in the package metadata; this version contains no functionality changes. | ||
## 3.0.0 - 2021-06-29 | ||
### Added | ||
@@ -20,3 +24,3 @@ | ||
## [2.3.1] (2021-05-16) | ||
## 2.3.1 - 2021-05-16 | ||
@@ -27,3 +31,3 @@ ### Changed | ||
## [2.3.0] (2021-05-14) | ||
## 2.3.0 - 2021-05-14 | ||
@@ -39,3 +43,3 @@ ### Added | ||
## [2.2.0] (2019-04-28) | ||
## 2.2.0 - 2019-04-28 | ||
@@ -46,13 +50,13 @@ ### Added | ||
## [2.1.0] (2019-04-27) | ||
## 2.1.0 - 2019-04-27 | ||
### Added | ||
- Introduced documentation to the Typescript type definitons. | ||
- Introduced documentation to the Typescript type definitions. | ||
## [2.0.0] (2018-02-13) | ||
## 2.0.0 - 2018-02-13 | ||
This version changes the focus of Crumble. It is now a cookie string library rather than an abstraction of `document.cookie`. | ||
### Changed. | ||
### Changed | ||
@@ -71,8 +75,8 @@ - `Crumble.setCookie()` and `Crumble.removeCookie()` no longer update `document.cookie`. They now return a string that you can assign to `document.cookie` yourself. | ||
## [1.1.0] (2018-01-04) | ||
## 1.1.0 - 2018-01-04 | ||
A code quality release; no functionality changes. | ||
## [1.0.0] (2017-05-16) | ||
## 1.0.0 - 2017-05-16 | ||
The initial public release. |
@@ -0,0 +0,0 @@ /** |
@@ -1,1 +0,1 @@ | ||
var e=new Date("Fri, 31 Dec 9999 23:59:59 GMT");function n(e){return e.replace(/([.*+?^=!:${}()/|[\]\\])/g,"\\$1")}function t(e){return encodeURIComponent(e).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)}function o(e){return encodeURIComponent(e).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent)}function r(e,o){var r=n(t(o));return new RegExp("(?:^|.*;)\\s*"+r+"\\s*\\=").test(e)}function i(e,o){var r=n(t(o)),i=new RegExp("(?:(?:^|.*;)\\s*"+r+"\\s*\\=\\s*(.*?)(?:;|$))").exec(e);return null===i?null:decodeURIComponent(i[1])}function a(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.value,i=n.name,a=void 0===i?null:i,s=n.age,u=n.expires,m=n.path,c=n.domain,p=n.secure,l=void 0!==p&&p,d=n.sameSite,g=void 0===d?"lax":d;if(null===a)throw new TypeError("The cookie name must be provided.");var f=t(a)+"=";if(null!=r&&(f+=o(r)),m&&(f+=";path="+m),c&&(f+=";domain="+c),s){if("number"!=typeof s||isNaN(s))throw new TypeError("The cookie age setting must be a valid number.");s===1/0&&(s=e.getTime()-Date.now()),(u=new Date).setTime(u.getTime()+s),f+=";max-age="+s/1e3,f+=";expires="+u.toUTCString()}else if(u){if("Invalid Date"===(u=u===1/0?e:new Date(u)).toString())throw new TypeError("The cookie expiry setting must represent a valid date.");f+=";max-age="+(s=u.getTime()-Date.now())/1e3,f+=";expires="+u.toUTCString()}if("none"!==g&&"lax"!==g&&"strict"!==g)throw new TypeError("The cookie samesite setting must take the value of `none`, `lax` or `strict`.");if(f+=";samesite="+g,l)f+=";secure";else if("none"===g)throw new Error("The cookie must be secure inorder to set its samesite setting to `none`.");return f}function s(e){return a({name:e.name,path:e.path,domain:e.domain,age:-36e5})}export{i as getCookie,r as hasCookie,s as removeCookie,a as setCookie}; | ||
var e=new Date("Fri, 31 Dec 9999 23:59:59 GMT");function n(e){return e.replace(/([.*+?^=!:${}()/|[\]\\])/g,"\\$1")}function t(e){return encodeURIComponent(e).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)}function o(e,o){var r=n(t(o));return new RegExp("(?:^|.*;)\\s*"+r+"\\s*\\=").test(e)}function r(e,o){var r=n(t(o)),i=new RegExp("(?:(?:^|.*;)\\s*"+r+"\\s*\\=\\s*(.*?)(?:;|$))").exec(e);return null===i?null:decodeURIComponent(i[1])}function i(n){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.value,r=n.name,i=void 0===r?null:r,a=n.age,s=n.expires,m=n.path,u=n.domain,c=n.secure,p=void 0!==c&&c,l=n.sameSite,d=void 0===l?"lax":l;if(null===i)throw new TypeError("The cookie name must be provided.");var g=t(i)+"=";if(null!=o&&(g+=encodeURIComponent(o).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent)),m&&(g+=";path="+m),u&&(g+=";domain="+u),a){if("number"!=typeof a||isNaN(a))throw new TypeError("The cookie age setting must be a valid number.");a===1/0&&(a=e.getTime()-Date.now()),(s=new Date).setTime(s.getTime()+a),g+=";max-age="+a/1e3,g+=";expires="+s.toUTCString()}else if(s){if("Invalid Date"===(s=s===1/0?e:new Date(s)).toString())throw new TypeError("The cookie expiry setting must represent a valid date.");g+=";max-age="+(a=s.getTime()-Date.now())/1e3,g+=";expires="+s.toUTCString()}if("none"!==d&&"lax"!==d&&"strict"!==d)throw new TypeError("The cookie samesite setting must take the value of `none`, `lax` or `strict`.");if(g+=";samesite="+d,p)g+=";secure";else if("none"===d)throw new Error("The cookie must be secure inorder to set its samesite setting to `none`.");return g}function a(e){return i({name:e.name,path:e.path,domain:e.domain,age:-36e5})}export{r as getCookie,o as hasCookie,a as removeCookie,i as setCookie}; |
MIT License | ||
Copyright (c) 2015 - 2021 Luke Phillips | ||
Copyright (c) 2015 - 2024 Luke Phillips | ||
@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: |
{ | ||
"name" : "crumble", | ||
"version" : "3.0.0", | ||
"version" : "3.0.1", | ||
@@ -21,7 +21,7 @@ "type" : "module", | ||
"homepage" : "https://github.com/lsphillips/Crumble", | ||
"homepage" : "https://github.com/lsphillips/crumble", | ||
"bugs" : | ||
{ | ||
"url" : "https://github.com/lsphillips/Crumble/issues" | ||
"url" : "https://github.com/lsphillips/crumble/issues" | ||
}, | ||
@@ -31,15 +31,16 @@ | ||
{ | ||
"rollup" : "2.52.3", | ||
"rollup-plugin-terser" : "7.0.2", | ||
"@rollup/plugin-babel" : "5.3.0", | ||
"mocha" : "9.0.1", | ||
"chai" : "4.3.4", | ||
"rollup" : "4.17.2", | ||
"@rollup/plugin-terser" : "0.4.4", | ||
"@rollup/plugin-babel" : "6.0.4", | ||
"mocha" : "10.4.0", | ||
"chai" : "4.4.1", | ||
"chai-string" : "1.5.0", | ||
"sinon" : "11.1.1", | ||
"eslint" : "7.29.0", | ||
"eslint-plugin-import" : "2.23.4", | ||
"eslint-plugin-promise" : "5.1.0", | ||
"eslint-config-protect-me-from-my-stupidity" : "7.2.2", | ||
"@babel/core" : "7.14.6", | ||
"@babel/preset-env" : "7.14.7" | ||
"sinon" : "18.0.0", | ||
"eslint" : "8.57.0", | ||
"eslint-plugin-import" : "2.29.1", | ||
"eslint-plugin-promise" : "6.1.1", | ||
"@stylistic/eslint-plugin-js" : "1.8.1", | ||
"eslint-config-protect-me-from-my-stupidity" : "10.1.0", | ||
"@babel/core" : "7.24.5", | ||
"@babel/preset-env" : "7.24.5" | ||
}, | ||
@@ -69,3 +70,3 @@ | ||
"type" : "git", | ||
"url" : "https://github.com/lsphillips/Crumble.git" | ||
"url" : "https://github.com/lsphillips/crumble.git" | ||
}, | ||
@@ -72,0 +73,0 @@ |
@@ -1,5 +0,5 @@ | ||
# Crumble | ||
# `crumble` | ||
[![Available from NPM](https://img.shields.io/npm/v/crumble.svg?maxAge=900)](https://www.npmjs.com/package/crumble) | ||
[![Built using Travis](https://img.shields.io/travis/com/lsphillips/Crumble/master.svg?maxAge=900)](https://travis-ci.com/lsphillips/Crumble) | ||
[![Built using GitHub Action](https://github.com/lsphillips/crumble/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/lsphillips/crumble/actions) | ||
@@ -6,0 +6,0 @@ A RFC-6265 compliant library that makes reading and writing cookies easy. |
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
17173
14