
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
simple-cookies
Advanced tools
yarn add simple-cookies
OR
npm install simple-cookies
import cookies from 'simple-cookies';
cookies.set('example', 'value' /*, cookieOpts (see below) */); // Return true if cookies are supported
cookies.get('example' /*, cookieOpts (see below) */); // Returns 'value' if cookies are supported
cookies.remove('example' /*, cookieOpts (see below) */); // Returns true if cookies are supported
For each cookie-method you can pass an optional last argument that is an object with any of the following properties and values:
| Name | Values | Effect |
|---|---|---|
| silent | true | false (default) |
| days | a number | How long the cookies should be valid (in days) optional |
| secure | true | false (default) |
| path | a string | Indicates the URL in which the cookie is used |
| domain | a string | The host(s) to whom the cookie will be sent to |
All of the code is licensed under the MIT license
FAQs
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.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.