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

thinkjs

Package Overview
Dependencies
Maintainers
5
Versions
240
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

thinkjs - npm Package Compare versions

Comparing version 2.3.1 to 2.3.2

2

package.json
{
"name": "thinkjs",
"description": "ThinkJS - Use full ES6/7 features to develop web applications, Support TypeScript",
"version": "2.3.1",
"version": "2.3.2",
"author": {

@@ -6,0 +6,0 @@ "name": "welefen",

@@ -8,2 +8,6 @@ 'use strict';

*/
// https://github.com/pillarjs/cookies/blob/master/index.js#L52
const SAME_SITE_REGEXP = /^(?:lax|none|strict)$/i;
let Cookie = {

@@ -61,3 +65,3 @@ /**

let expires = options.expires;
if (expires){
if (expires) {
if (!think.isDate(expires)) {

@@ -67,6 +71,12 @@ expires = new Date(expires);

item.push('Expires=' + expires.toUTCString());
}
}
if (options.httponly) {
item.push('HttpOnly');
}
if (options.samesite) {
const samesite = options.samesite === true ? 'strict' : options.samesite.toLowerCase();
if (SAME_SITE_REGEXP.test(samesite)) {
item.push('SameSite=' + samesite);
}
}
if (options.secure) {

@@ -100,2 +110,2 @@ item.push('Secure');

export default Cookie;
export default Cookie;
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