Meteor Cookie

screenshot of Meteor Cookie

(DEPRECATED, no longer maintenance) Simple cookies for browser of Meteor

Overview

Meteor CookieWrapper is a powerful utility designed for managing cookies in your Meteor applications. It simplifies the process of setting, getting, and removing cookies, making it easier to handle user sessions and preferences without delving into complex cookie management. This tool is especially beneficial for developers looking for an efficient way to handle cookies while maintaining a clean codebase.

The features offered by Meteor CookieWrapper enhance the flexibility and ease of cookie manipulation, allowing you to customize cookie behavior according to your application's requirements. Whether you need to set a cookie with specific options or retrieve a value effortlessly, CookieWrapper provides straightforward methods to accomplish these tasks seamlessly.

Features

  • Get Cookie: The Cookie.get(name, [options]) method retrieves a cookie by name, utilizing an optional converter function for custom processing of the cookie's value.

  • Set Cookie: With Cookie.set(name, value, [options]), you can create or update a cookie with comprehensive options such as path, domain, expiration time, and encoding preferences.

  • Remove Cookie: The Cookie.remove(name, [options]) method enables the deletion of cookies, helping to maintain user privacy and data integrity by ensuring unnecessary cookies are promptly removed.

  • Flexible Options: Options can include paths and domains as strings, expiration as an integer or a Date object, and a raw boolean to control whether the cookie value is encoded or not.

  • Custom Encoder: The ability to provide a converter function allows you to customize how the data is transformed when stored or retrieved from the cookie.

  • Default Decoding: Cookies are automatically decoded by default during read and write operations, making it easier to work with cookie data without worrying about encoding complexities.

  • Simple Integration: Built for Meteor, CookieWrapper integrates seamlessly into existing Meteor projects, allowing for a quick setup and straightforward usage.