Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
cookie-crisp
Advanced tools
A small cookie utility for getting, setting, and deleting cookies
init( doc )
Initializes cookie-crisp. Can optionally pass in a reference to document
that differs from window.document
.
get( cookieName, decode )
Returns a cookie value given a cookie name. By default, the cookie value is decoded before being returned.
set( key, value, opts )
Sets a cookie given a key, value, and a set of options:
opts.path
Path to write cookie (default being /
).
opts.days
Days from now that you would like the cookie to expire.
opts.expires
Available if you would like to pass your own GMT expiration date.
opts.encode
Whether or not the cookie key/value should be encoded before being set.
remove( cookieName )
Shortcut for setting a cookie's expiration to Thu, 01 Jan 1970 00:00:01 GMT
.
FAQs
Get and set browser cookies
The npm package cookie-crisp receives a total of 0 weekly downloads. As such, cookie-crisp popularity was classified as not popular.
We found that cookie-crisp demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.