Easy Cookie

Product Information

Always Free
Enjoy source code projects for free, exclusively for the PieceX community.

Programming Language

Usability

User Guide

Developer

avatar
Talha Qureshi
Request Code Sample Direct message

Aug 30, 2024

Public chat

Product Details

Easy Cookie is a lightweight JavaScript library designed to simplify cookie management in web applications. It provides a straightforward API for setting, getting, removing, and checking the existence of cookies.


Key Features


  • Intuitive API: Easy-to-use functions for common cookie operations.

  • Customizable Expiration: Set expiration times in minutes for temporary cookies.

  • Path-Based Scoping: Control cookie visibility within specific paths of your website.

  • Clear Documentation: Comprehensive explanations and examples for easy understanding.

Usage Examples


Setting a Cookie:




JavaScript




Cookie.set('username', 'john_doe');






Getting a Cookie:




JavaScript




const username = Cookie.get('username');
console.log(username); // Output: "john_doe"






Removing a Cookie:




JavaScript




Cookie.remove('username');






Checking Cookie Existence:




JavaScript




if (Cookie.exists('username')) {
// Cookie exists
} else {
// Cookie does not exist
}






Additional Notes


  • TypeScript Support: Future plans include creating a TypeScript version for improved type safety.

  • Ongoing Refinement: The library may undergo updates and improvements to enhance its functionality and efficiency.

By using Easy Cookie, developers can efficiently manage cookies within their JavaScript applications, streamlining common cookie-related tasks and making their code more concise and readable.

It is a wrapper over the native cookies of a browser. It allows you to:

- Set Cookies
- Read Cookies
- Remove Cookies
- Check if a Cookie exists

Installation Instructions

This is not a package, it is a simple Javascript file that requires no installation. Simple drag and drop the file into your project to using it.

import the Cookie function and use as explained in the readme.

Change and Adaptation Instructions

You don't really need to change anything, it works out of the box and there's no form of watermarks on it. Feel free to adjust it to your requirements if needed.

Ping me if you'd like help with something.

Price Information

No available data

Limited Preview Only


Real Product Contains All Files And Full Code

Check dependencies

See product external dependencies

Randomly Selected Sample File

Project File Statistics

Hierarchy

Choose a sample file
X
user-symbol

Stay in touch

Get Practical Tips For Business and Developers.

Learn about PieceX Community Needs for Source Code Projects.

Be the First to Know PieceX Newest Free Community Code Projects.