@ndla/util
Advanced tools
Comparing version 0.3.6 to 0.4.0
@@ -1,2 +0,2 @@ | ||
export var setCookie = function setCookie(cookieName, cookieValue, removeCookie) { | ||
export var setCookie = function setCookie(cookieName, cookieValue, removeCookie, lax) { | ||
var expires; | ||
@@ -12,3 +12,3 @@ | ||
document.cookie = "".concat(cookieName, "=").concat(cookieValue, "; ").concat(expires, "; path=/"); | ||
document.cookie = "".concat(cookieName, "=").concat(cookieValue, "; ").concat(expires, "; SameSite=").concat(lax ? 'Lax' : 'Strict', "; path=/"); | ||
}; | ||
@@ -15,0 +15,0 @@ export var getCookie = function getCookie(cookieName, cookies) { |
@@ -1,4 +0,4 @@ | ||
export declare const setCookie: (cookieName: string, cookieValue: string, removeCookie: boolean) => void; | ||
export declare const setCookie: (cookieName: string, cookieValue: string, removeCookie: boolean, lax?: boolean | undefined) => void; | ||
export declare const getCookie: (cookieName: string, cookies: string) => any; | ||
export declare const isValidCookie: (cookieName: string, cookies: string) => boolean; | ||
export declare const deleteCookie: (cookieName: string) => void; |
@@ -8,3 +8,3 @@ "use strict"; | ||
var setCookie = function setCookie(cookieName, cookieValue, removeCookie) { | ||
var setCookie = function setCookie(cookieName, cookieValue, removeCookie, lax) { | ||
var expires; | ||
@@ -20,3 +20,3 @@ | ||
document.cookie = "".concat(cookieName, "=").concat(cookieValue, "; ").concat(expires, "; path=/"); | ||
document.cookie = "".concat(cookieName, "=").concat(cookieValue, "; ").concat(expires, "; SameSite=").concat(lax ? 'Lax' : 'Strict', "; path=/"); | ||
}; | ||
@@ -23,0 +23,0 @@ |
{ | ||
"name": "@ndla/util", | ||
"version": "0.3.6", | ||
"version": "0.4.0", | ||
"description": "Collection of util functions used by NDLA", | ||
@@ -34,3 +34,3 @@ "license": "GPL-3.0", | ||
}, | ||
"gitHead": "1b251643714d8c6167af3e9219d35e1af0602268" | ||
"gitHead": "1d65d18513677512146cfe97749267249d8ca25a" | ||
} |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
62507
0