{"id":18356147,"url":"https://github.com/miguelzacca/super-sessionstorage","last_synced_at":"2026-02-09T13:02:24.042Z","repository":{"id":251683832,"uuid":"838118745","full_name":"miguelzacca/super-sessionstorage","owner":"miguelzacca","description":"Implementation of improved window.sessionStorage for server, Type-Safe, and TTL cache system.","archived":false,"fork":false,"pushed_at":"2024-09-04T20:08:54.000Z","size":70,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-13T16:44:36.539Z","etag":null,"topics":["cache","inmemory","parse","parsed","server","sessionstorage","storage","super","ttl","ttl-cache","type-safe","typesafe","window"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/miguelzacca.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-05T01:31:40.000Z","updated_at":"2024-09-04T20:08:58.000Z","dependencies_parsed_at":"2024-08-07T14:48:02.999Z","dependency_job_id":"06d29e84-269b-4814-b6ed-051279656aeb","html_url":"https://github.com/miguelzacca/super-sessionstorage","commit_stats":null,"previous_names":["miguelzacca/super-sessionstorage"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/miguelzacca/super-sessionstorage","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelzacca%2Fsuper-sessionstorage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelzacca%2Fsuper-sessionstorage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelzacca%2Fsuper-sessionstorage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelzacca%2Fsuper-sessionstorage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miguelzacca","download_url":"https://codeload.github.com/miguelzacca/super-sessionstorage/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelzacca%2Fsuper-sessionstorage/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29266089,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-09T12:53:16.161Z","status":"ssl_error","status_checked_at":"2026-02-09T12:52:30.244Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cache","inmemory","parse","parsed","server","sessionstorage","storage","super","ttl","ttl-cache","type-safe","typesafe","window"],"created_at":"2024-11-05T22:09:04.892Z","updated_at":"2026-02-09T13:02:24.018Z","avatar_url":"https://github.com/miguelzacca.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Super sessionStorage\n\nImplementation of improved `window.sessionStorage` for server, `Type-Safe`, and TTL cache system.\n\nit works without the need for a `window`. Furthermore, super sessionstorage maintains the original types, avoiding the need to make conversions. (type-safe storage).\n\n## Install\n\n```bash\nnpm install super-sessionstorage\n```\n\n## Methods\n\n- `setItem(key: string, value: T, customTTL?: number): void`\n\n- `getItem(key: string): T | undefined`\n\n- `key(index: number): string | undefined`\n\n- `has(key: string): boolean`\n\n- `includes(value: T): boolean`\n\n- `clear(): void`\n\n- `get length(): number`\n\n- `removeItem(key: string): void`\n\n## Options\n\n- `stdTTL` default is infinity (seconds)\n\n- `checkperiod` default is 60 (seconds)\n\n## Strict Type\n\n```js\nconst storage = new SuperSessionStorage\u003cCustomItemType\u003e({ /* options */ })\n```\n\n## Example\n\n#### config.js:\n\n```js\nimport { SuperSessionStorage } from 'super-sessionstorage'\n\nexport const storage = new SuperSessionStorage({ stdTTL: 3600 })\n```\n\n#### setItem:\n\n```js\nimport { storage } from './config.js'\n\nconst myObject = {\n  test1: 123,\n  test2: [1, 2, '123'],\n}\n\nstorage.setItem('example', myObject)\n```\n\n#### getItem:\n\n```js\nimport { storage } from './config.js'\n\nconst example = storage.getItem('example')\n\nconsole.log(example)\nconsole.log(typeof example)\n```\n\n#### output:\n\n```txt\n{ test1: 123, test2: [1, 2, \"123\"] }\nobject\n```\n\n#### Strict Type:\n\n```js\nimport { SuperSessionStorage } from 'super-sessionstorage'\n\ntype Item = { id: number;  productName: string }\n\nconst storage = new SuperSessionStorage\u003cItem\u003e()\n\nstorage.setItem('example1', { id: '100', productName: 'test' })\n// Error: Id should be number\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiguelzacca%2Fsuper-sessionstorage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiguelzacca%2Fsuper-sessionstorage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiguelzacca%2Fsuper-sessionstorage/lists"}