{"id":13734902,"url":"https://github.com/unshiftio/sessionstorage","last_synced_at":"2025-10-04T19:02:15.265Z","repository":{"id":24745331,"uuid":"28157887","full_name":"unshiftio/sessionstorage","owner":"unshiftio","description":"sessionStorage API which gracefully degrades to window.name \u0026 cookies when not available","archived":false,"fork":false,"pushed_at":"2022-01-06T16:13:39.000Z","size":27,"stargazers_count":23,"open_issues_count":6,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-07T12:55:53.082Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unshiftio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-17T22:12:53.000Z","updated_at":"2024-02-07T10:52:10.000Z","dependencies_parsed_at":"2022-08-17T18:50:14.160Z","dependency_job_id":null,"html_url":"https://github.com/unshiftio/sessionstorage","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unshiftio%2Fsessionstorage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unshiftio%2Fsessionstorage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unshiftio%2Fsessionstorage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unshiftio%2Fsessionstorage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unshiftio","download_url":"https://codeload.github.com/unshiftio/sessionstorage/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252882880,"owners_count":21819156,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T03:01:01.042Z","updated_at":"2025-10-04T19:02:10.192Z","avatar_url":"https://github.com/unshiftio.png","language":"JavaScript","funding_links":[],"categories":["awesome-web-storage [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome)"],"sub_categories":["Different Storage APIs"],"readme":"# sessionstorage\n\n[![Made by unshift][made-by]](http://unshift.io)[![Version npm][version]](http://browsenpm.org/package/sessionstorage)[![Build Status][build]](https://travis-ci.org/unshiftio/sessionstorage)[![Dependencies][david]](https://david-dm.org/unshiftio/sessionstorage)[![Coverage Status][cover]](https://coveralls.io/r/unshiftio/sessionstorage?branch=master)[![IRC channel][irc]](http://webchat.freenode.net/?channels=unshift)\n\n[made-by]: https://img.shields.io/badge/made%20by-unshift-00ffcc.svg?style=flat-square\n[version]: https://img.shields.io/npm/v/sessionstorage.svg?style=flat-square\n[build]: https://img.shields.io/travis/unshiftio/sessionstorage/master.svg?style=flat-square\n[david]: https://img.shields.io/david/unshiftio/sessionstorage.svg?style=flat-square\n[cover]: https://img.shields.io/coveralls/unshiftio/sessionstorage/master.svg?style=flat-square\n[irc]: https://img.shields.io/badge/IRC-irc.freenode.net%23unshift-00a8ff.svg?style=flat-square\n\nThe `sessionStorage` API is amazing and super useful when you need to store data\ntemporarily in the browser. We used to abuse cookies for this, but not all the\ndata that you want to store needs to be synced with the server. The\n`sessionStorage` API filled that gap, but unfortunately we cannot expect this API\nto be available and enabled in every browser context. This module provides\nvarious of fallbacks which follow the same API as `sessionStorage` for when it's\nnot enabled. The following fallback's are supported:\n\n- `window.name` - Storing data in the `name` property of the window.\n- `cookies` - This doesn't really need an explanation.\n\n## Install\n\nIt's build for browserify but it should work with Node.js as well as we provide\na fallback API. The module is released in the public npm registry and can be\ninstalled using:\n\n```\nnpm install --save sessionstorage\n```\n\n## Usage\n\nThe API is exactly the same as the DOM storage API so you can use the following\nmethods:\n\n- `getItem(key)`\n- `setItem(key, value)`\n- `removeItem(key)`\n- `clear()`\n\nSo all you need to do is require the module and you're ready to go:\n\n```js\n'use strict';\n\nvar sessionstorage = require('sessionstorage');\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funshiftio%2Fsessionstorage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funshiftio%2Fsessionstorage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funshiftio%2Fsessionstorage/lists"}