onedionys-cookie-consent-manager

5.0.0 • Public • Published

Welcome to One Dionys - Cookie Consent Manager! 👋

A component to display notifications and manage user consent to the use of cookies in web applications. 💖

💾 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

📝 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

Package Sidebar

Install

npm i onedionys-cookie-consent-manager

Weekly Downloads

1

Version

5.0.0

License

ISC

Unpacked Size

13.3 kB

Total Files

6

Last publish

Collaborators

  • onedionys