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

@ndla/util

Package Overview
Dependencies
Maintainers
4
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ndla/util - npm Package Compare versions

Comparing version 0.3.6 to 0.4.0

4

es/cookieHandler.js

@@ -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"
}
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