Socket
Socket
Sign inDemoInstall

@financial-times/privacy-us-privacy

Package Overview
Dependencies
1
Maintainers
18
Versions
44
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.3.4 to 0.3.5

5

dist/cjs/main.js

@@ -67,5 +67,8 @@ "use strict";

function setUSPrivacyCookie(consent) {
// The problem of removing any subdomain from a hostname is relatively involved,
// and we are not trying to make it this work for every possible subdomain yet
const domain = (document.location.hostname || "").replace("www.", "");
const uspString = `1Y${consent ? "N" : "Y"}N`;
document.cookie = `usprivacy=${uspString}; max-age=${60 * 60 * 24 * 365};path=/`;
document.cookie = `usprivacy=${uspString}; max-age=${60 * 60 * 24 * 365};path=/;domain=${domain}`;
}
exports.setUSPrivacyCookie = setUSPrivacyCookie;

@@ -63,4 +63,7 @@ import { fetchLegislation } from "@financial-times/privacy-legislation-client";

export function setUSPrivacyCookie(consent) {
// The problem of removing any subdomain from a hostname is relatively involved,
// and we are not trying to make it this work for every possible subdomain yet
const domain = (document.location.hostname || "").replace("www.", "");
const uspString = `1Y${consent ? "N" : "Y"}N`;
document.cookie = `usprivacy=${uspString}; max-age=${60 * 60 * 24 * 365};path=/`;
document.cookie = `usprivacy=${uspString}; max-age=${60 * 60 * 24 * 365};path=/;domain=${domain}`;
}

4

package.json
{
"name": "@financial-times/privacy-us-privacy",
"description": "",
"version": "0.3.4",
"version": "0.3.5",
"main": "dist/cjs/main.js",

@@ -15,3 +15,3 @@ "module": "dist/esm/main.js",

"dependencies": {
"@financial-times/privacy-legislation-client": "^0.3.4"
"@financial-times/privacy-legislation-client": "^0.3.5"
},

@@ -18,0 +18,0 @@ "scripts": {

@@ -88,4 +88,7 @@ import { fetchLegislation } from "@financial-times/privacy-legislation-client";

export function setUSPrivacyCookie(consent: boolean): void {
// The problem of removing any subdomain from a hostname is relatively involved,
// and we are not trying to make it this work for every possible subdomain yet
const domain = (document.location.hostname || "").replace("www.", "");
const uspString = `1Y${consent ? "N" : "Y"}N`;
document.cookie = `usprivacy=${uspString}; max-age=${60 * 60 * 24 * 365};path=/`;
document.cookie = `usprivacy=${uspString}; max-age=${60 * 60 * 24 * 365};path=/;domain=${domain}`;
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc