
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
@transferwise/cookie-consent
Advanced tools

This repo contains helper functions to make your application compliant with ICO regulations. How to make your application compliant with ICO regulations
yarn add @transferwise/cookie-consent
import { hasValidConsent } from "@transferwise/cookie-consent";
if (hasValidConsent()) {
mixpanel.opt_in_tracking();
}
hasValidConsent()
checks the cookie consent from document.cookie
. If consent
cookie is not there or document
is undefined then it will return false
.
import { cookie } from "@transferwise/cookie-consent";
cookie.write(
"username=John Doe; expires=Thu, 18 Dec 2013 12:00:00 UTC; path=/"
);
cookie.write(string, object)
takes 2 arguments:
document.cookie
essential
- if it's
true
then we will add it to document.cookie
even when we don't have
consent
How to know if my cookie is essential?Adding essential cookie
:
import { cookie } from "@transferwise/cookie-consent";
cookie.write(
"username=John Doe; expires=Thu, 18 Dec 2013 12:00:00 UTC; path=/",
{ essential: true }
);
yarn test
The package also includes the constants used when creating the consent cookie, and a JSON representation of the cookie policy.
These are typically utilised by the consent mechansim, audit tooling (e.g., cookie monster).
CHANGELOG.md
FAQs
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.