store2 or Strata Storage?
A small wrapper over localStorage and sessionStorage that adds JSON handling, namespaces and a page-lifetime area.
Last checked 7 Nov 2026. Open store2
Who each one suits.
Choose store2 if you only use localStorage and sessionStorage in a web page and want a synchronous, namespaced wrapper that is 1.6 kB gzipped per bundlephobia on 2026-11-07.
Choose Strata Storage if the values also need to live in IndexedDB, a cookie, the URL or a native secure store, with the same getSync() on the stores that are synchronous.
The stores, side by side.
“Not stated” means the pages we checked don’t mention it. It doesn’t mean the library can’t do it.
| Store | store2 | Strata Storage |
|---|
| localStorage | Yes Checked 7 Nov 2026 Source | Yes |
|---|
| IndexedDB | Not stated on the pages we checked | Yes |
|---|
| sessionStorage | Yes Checked 7 Nov 2026 Source | Yes |
|---|
| Cookies | Not stated on the pages we checked | Yes |
|---|
| URL parameters as a store | Not stated on the pages we checked | Yes |
|---|
| iOS Keychain | Not stated on the pages we checked | Yes |
|---|
| Android secure storage (Keystore-backed) | Not stated on the pages we checked | Yes |
|---|
| Native preferences (UserDefaults / SharedPreferences) | Not stated on the pages we checked | Yes |
|---|
| Web and native stores behind one API | Not stated on the pages we checked | Yes |
|---|
| No runtime dependencies | Yes Checked 7 Nov 2026 Source | Yes |
|---|
Licence, size, downloads.
| Fact | store2 | Strata Storage |
|---|
| Licence | MIT Source | MIT Source |
|---|
| npm version | 2.14.4 | 3.1.4 |
|---|
| Bundle size | 1,645 bytes gzipped, 4,503 minified. For version 2.14.4. Checked 7 Nov 2026 Source | 21,468 bytes gzipped, 79,645 minified. For version 3.1.4. Checked 7 Nov 2026 Source |
|---|
| Weekly downloads | 2,773,240, 31 Oct 2026 to 6 Nov 2026 Source | 486, 31 Oct 2026 to 6 Nov 2026 Source |
|---|
| Cost | Open source under the MIT licence; no price is stated on the pages we checked Source | Free to install and use; the website takes voluntary support of an amount the supporter chooses |
|---|
Coming from store2?
The docs guide lists the calls that change and shows how to carry existing values over. Read the store2 guide
All 12 libraries