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

ngx-cookie-service

Package Overview
Dependencies
Maintainers
1
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-cookie-service - npm Package Compare versions

Comparing version 2.0.2 to 2.1.0

15

cookie-service/cookie.service.d.ts

@@ -22,10 +22,11 @@ import { InjectionToken } from '@angular/core';

/**
* @param name Cookie name
* @param value Cookie value
* @param expires Number of days until the cookies expires or an actual `Date`
* @param path Cookie path
* @param domain Cookie domain
* @param secure Secure flag
* @param name Cookie name
* @param value Cookie value
* @param expires Number of days until the cookies expires or an actual `Date`
* @param path Cookie path
* @param domain Cookie domain
* @param secure Secure flag
* @param sameSite OWASP samesite token `Lax` or `Strict`
*/
set(name: string, value: string, expires?: number | Date, path?: string, domain?: string, secure?: boolean): void;
set(name: string, value: string, expires?: number | Date, path?: string, domain?: string, secure?: boolean, sameSite?: 'Lax' | 'Strict'): void;
/**

@@ -32,0 +33,0 @@ * @param name Cookie name

@@ -67,10 +67,11 @@ // This service is based on the `ng2-cookies` package which sadly is not a service and does

/**
* @param name Cookie name
* @param value Cookie value
* @param expires Number of days until the cookies expires or an actual `Date`
* @param path Cookie path
* @param domain Cookie domain
* @param secure Secure flag
* @param name Cookie name
* @param value Cookie value
* @param expires Number of days until the cookies expires or an actual `Date`
* @param path Cookie path
* @param domain Cookie domain
* @param secure Secure flag
* @param sameSite OWASP samesite token `Lax` or `Strict`
*/
CookieService.prototype.set = function (name, value, expires, path, domain, secure) {
CookieService.prototype.set = function (name, value, expires, path, domain, secure, sameSite) {
if (!this.documentIsAccessible) {

@@ -98,2 +99,5 @@ return;

}
if (sameSite) {
cookieString += 'sameSite=' + sameSite + ';';
}
this.document.cookie = cookieString;

@@ -100,0 +104,0 @@ };

{
"name": "ngx-cookie-service",
"description": "an (aot ready) angular (4.2+) cookie service",
"version": "2.0.2",
"version": "2.1.0",
"license": "MIT",

@@ -48,2 +48,5 @@ "author": "7leads GmbH <info@7leads.org>",

"name": "mattbanks"
},
{
"name": "DBaker85"
}

@@ -50,0 +53,0 @@ ],

@@ -86,3 +86,3 @@ # NGX Cookie Service

## set( name: string, value: string, expires?: number | Date, path?: string, domain?: string, secure?: boolean ): void;
## set( name: string, value: string, expires?: number | Date, path?: string, domain?: string, secure?: boolean, sameSite?: 'Lax' | 'Strict' ): void;

@@ -89,0 +89,0 @@ ```typescript

Sorry, the diff of this file is not supported yet

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