A component to display notifications and manage user consent to the use of cookies in web applications. 💖
-
Web Browser
- Can be used as an emulator to build applications. Example [Chrome, Firefox, Safari & Opera]. -
Internet
- Because many use CDN and to make it easier to find solutions to all problems.
const CookieConsentManager = require('./src/cookieConsentManager');
// Initialize CookieConsentManager
const cookieManager = new CookieConsentManager();
// Accept cookies
cookieManager.acceptCookies('analytics');
// Revoke cookies
cookieManager.revokeCookies('analytics');
// Check if consented to a cookie
const hasConsented = cookieManager.hasConsented('analytics');
console.log(hasConsented); // Output: true or false
- This package provides a simple way to manage user consent for cookies in a web application. It allows accepting, revoking, and checking consent for specific cookies.
-
acceptCookies(cookieName)
: Accepts the specified cookie. -
revokeCookies(cookieName)
: Revokes consent for the specified cookie. -
hasConsented(cookieName)
: Checks if consent has been given for the specified cookie. Returns true if consented, otherwise false.
- v1.0.0 : 17 March 2024
- v1.0.1 : 18 March 2024
- v5.0.0 : 31 March 2024
- Facebook : Oned Ionys
- Instagram : @onedionys
- Twitter : @onedionys
- LinkedIn : @onedionys
- Copyright © 2024 One Dionys
- One Dionys - Cookie Consent Manager is an open source project licensed under the MIT license
Love One Dionys - Cookie Consent Manager? Support this project by donating or sharing with others in need.
Made with ❤️ One Dionys