{"id":24961319,"url":"https://github.com/streammedev/storage","last_synced_at":"2025-03-28T22:27:38.369Z","repository":{"id":57163119,"uuid":"77247977","full_name":"StreamMeDev/storage","owner":"StreamMeDev","description":"A web storage wrapper","archived":false,"fork":false,"pushed_at":"2017-01-16T15:38:33.000Z","size":13,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-08T19:35:36.385Z","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":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StreamMeDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-23T20:02:28.000Z","updated_at":"2019-01-31T00:45:32.000Z","dependencies_parsed_at":"2022-09-01T03:02:36.511Z","dependency_job_id":null,"html_url":"https://github.com/StreamMeDev/storage","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StreamMeDev%2Fstorage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StreamMeDev%2Fstorage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StreamMeDev%2Fstorage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StreamMeDev%2Fstorage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StreamMeDev","download_url":"https://codeload.github.com/StreamMeDev/storage/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246108357,"owners_count":20724715,"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":"2025-02-03T08:52:08.549Z","updated_at":"2025-03-28T22:27:38.346Z","avatar_url":"https://github.com/StreamMeDev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A Web Storage Wrapper\n\n[![NPM Version](https://img.shields.io/npm/v/@streammedev/storage.svg)](https://npmjs.org/package/@streammedev/storage)\n[![NPM Downloads](https://img.shields.io/npm/dm/@streammedev/storage.svg)](https://npmjs.org/package/@streammedev/storage)\n[![js-happiness-style](https://img.shields.io/badge/code%20style-happiness-brightgreen.svg)](https://github.com/JedWatson/happiness)\n\nWeb storage for cookies/localStorage/sessionStorage/memory with expiration and other helpful features.\n\n**Features:**\n\n- Multiple storage drivers guarantee at minimum in memory storage\n- Filter value, useful for storing json or other non-string data\n- Filter key, useful for consolidating keys\n- Use cookie like path and expires with local and session storage\n\n## Install\n\n```\n$ npm install --save @streammedev/storage\n```\n\n## Usage\n\n```javascript\nvar Storage = require('@streammedev/storage');\n\nvar store = new Storage({\n\t// backend: null, specify a backend with either a \n\t// string name or constructor function\n\tbackend: 'memory'\n\n\t// Sets the domain, only used with cookies\n\tdomain: 'example.com',\n\n\t// Filter function for getting and settting\n\tsetValueFilter: identity,\n\tgetValueFilter: identity,\n\n\t// Filter function for the key\n\tkeyFilter: identity\n});\n\nstore.setItem('foo', 'bar');\nstore.getItem('foo'); // 'bar'\nstore.removeItem('foo');\nstore.getItem('foo'); // undefined\nstore.clear('foo'); // undefined\n```\n\n## Contributing\n\nContributions are welcome.  Please see our guidelines in [CONTRIBUTING.md](contributing.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstreammedev%2Fstorage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstreammedev%2Fstorage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstreammedev%2Fstorage/lists"}