cookie-store
Advanced tools
Weekly downloads
Changelog
3.0.0
Readme
cookie-store
A polyfill to allow use of the Cookie Store API in modern browsers that don't support it natively, including IE11. Also compatible with TypeScript.
npm install cookie-store
// import polyfill and declare types
import 'cookie-store';
// set a cookie
await cookieStore.set('forgive', 'me');
// get a cookie
const foo = await cookieStore.get('forgive');
console.log(foo); // { name: 'forgive', value: 'me' }
// set another cookie
await cookieStore.set('forget', 'it');
// get multiple cookies
const cookies = await cookieStore.getAll();
console.log(obj); // [{ name: 'forgive', value: 'me' }, { name: 'forget', value: 'it' }]
// delete a cookie
await cookieStore.delete('forget');
FAQs
A polyfill for the Cookie Store API
The npm package cookie-store receives a total of 379 weekly downloads. As such, cookie-store popularity was classified as not popular.
We found that cookie-store 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 installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.