Security News
New Proposed CISA Mandate Would Require Critical Infrastructure to Report Ransom Payments Within 24 Hours
CISA has proposed a set of new rules that would require critical infrastructure to report cyber incidents and ransom payments.
@envato/cookie-consent
Advanced tools
Some helper functions to deal with cookie-consent
Weekly downloads
Readme
The npm package for cookie consent helpers. These functions are tighly coupled to using the cookiebot api at the moment.
npm install @envato/cookie-consent --save
# or using `yarn`
yarn add @envato/cookie-consent
import { Consent, consented, deferRun } from '@envato/cookie-consent'
// Check for consent inline (note that on the initial page load this function may return false)
if (consented(Consent.statistics)) {
// Do something..
}
// Manually parse and check the consent type in the CookieConsent cookie
checkCookieConsent(Cookies.get('CookieConsent'), Consent.statistics)
// Run function after consent
deferRun(() => {
doSomething()
}, Consent.marketing)
// Types of consent we support:
Consent.marketing
Consent.statistics
Consent.preferences
Consent.necessary
There is a cookiebot.css
in the module, you can include it to partially override the default Cookiebot style.
The file clsFixSnippet.ts
contains a code snippet that fixes a CLS issue caused by the cookiebot dialog. It's being exported as a string. When including the code in your app, make sure it runs before the main cookiebot code.
Run
npm version (patch/minor/major)
npm publish
FAQs
Some helper functions to deal with cookie-consent
The npm package @envato/cookie-consent receives a total of 278 weekly downloads. As such, @envato/cookie-consent popularity was classified as not popular.
We found that @envato/cookie-consent demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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
CISA has proposed a set of new rules that would require critical infrastructure to report cyber incidents and ransom payments.
Security News
Redis is no longer OSS, breaking its explicit commitment to remain under the BSD 3-Clause License forever. This has angered contributors who are now working to fork the software.
Product
Socket AI now enables 'AI detected potential malware' alerts by default, ensuring users benefit from AI-powered state-of-the-art malware detection without needing to opt-in.