onedionys-cookie-consent-manager
v5.0.0
Published
One Dionys (Cookie Consent Manager) - A component to display notifications and manage user consent to the use of cookies in web applications.
Downloads
7
Maintainers
Readme
💾 Requirements
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.
🎯 How To Use
Example Syntax
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
Explanation
- 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.
Return Value
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.
📆 Release Date
- v1.0.0 : 17 March 2024
- v1.0.1 : 18 March 2024
- v5.0.0 : 31 March 2024
🧑 Author
- Facebook : Oned Ionys
- Instagram : @onedionys
- Twitter : @onedionys
- LinkedIn : @onedionys
📝 License
- Copyright © 2024 One Dionys
- One Dionys - Cookie Consent Manager is an open source project licensed under the MIT license
☕️ Suppport & Donation
Love One Dionys - Cookie Consent Manager? Support this project by donating or sharing with others in need.
Made with ❤️ One Dionys