Easy Cookie
Developer
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:
Cookie.set('username', 'john_doe');
Getting a Cookie:
const username = Cookie.get('username');
console.log(username); // Output: "john_doe"
Removing a Cookie:
Cookie.remove('username');
Checking Cookie Existence:
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
import the Cookie function and use as explained in the readme.
Change and Adaptation Instructions
Ping me if you'd like help with something.
Price Information
No available data