es-cookie

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
e

es-cookie

A JavaScript module for handling cookies

1.5.0
latest
100

Supply Chain Security

100

Vulnerability

100

Quality

76

Maintenance

100

License

Version published
Weekly downloads
234K
-15.06%
Maintainers
1
Weekly downloads
 
Created
Issues
3

What is es-cookie?

The es-cookie npm package is a simple and lightweight JavaScript library for handling cookies in the browser. It provides an easy-to-use API for setting, getting, and deleting cookies.

What are es-cookie's main functionalities?

Set a Cookie

This feature allows you to set a cookie with a specified name and value. The optional third parameter can be used to set additional cookie attributes such as expiration time, path, domain, and secure flag.

esCookie.set('name', 'value', { expires: 7 });

Get a Cookie

This feature allows you to retrieve the value of a cookie by its name. If the cookie does not exist, it returns undefined.

const value = esCookie.get('name');

Delete a Cookie

This feature allows you to delete a cookie by its name. You can also specify additional attributes to ensure the correct cookie is removed.

esCookie.remove('name');

Other packages similar to es-cookie

FAQs

Package last updated on 19 Apr 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts