npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

redux-storage-engine-cookies

v1.0.0

Published

cookie engine for redux-storage

Downloads

259

Readme

redux-storage-engine-cookies

dependencies devDependencies

license npm version npm downloads

document.cookie based engine for redux-storage.

Installation

npm install --save redux-storage-engine-cookies

Usage

Stores everything inside a cookie.

import createEngine from 'redux-storage-engine-cookies';
const engine = createEngine('my-save-key', options);

options is an optional hash of options to pass to js-cookie. These options include:

  • options.expires: Either a number representing the number of days the cookie will persist, or a Date object. If omitted, the cookie will be a session cookie.
  • options.path: path under which the cookie is valid. Default is /. Due to an IE bug, do not include a filename in the path (such as /path/to/file.ext). IE will be unable to read the cookie if you do this. Instead, just use a path like /path/to/.
  • options.domain: What domain the cookie is valid on. By default, it will be valid on the domain where the cookie is created. IE allows cookies to be accessed under all nested subdomains as well (such as sub1.sub2.example.org).
  • options.secure: If true, requires HTTPS. Default is false.

See js-cookie for additional documentation for these options.

Warning: Browsers allocate a very limited amount of space to cookies, so don't expect to be able to store a large amount of data here! IE, for example, limits all cookies to a total of 4096 bytes. If you have multiple cookies on your domain, this means that the number of bytes you can store might be significantly less than 4096 since you must share storage space with the other cookies.

Warning: document.cookie does not expose a async API and every save/load operation will block the JS thread!

Warning: Some browsers like IE<=11 do not support Promises! You could use something like es6-promise to polyfill.