{"id":21995749,"url":"https://github.com/excaliburhan/xp-storage","last_synced_at":"2026-05-02T17:37:40.623Z","repository":{"id":18906825,"uuid":"85540496","full_name":"excaliburhan/xp-storage","owner":"excaliburhan","description":"☁A lib for html5 localStorage, support expired time.","archived":false,"fork":false,"pushed_at":"2024-03-14T06:22:37.000Z","size":266,"stargazers_count":1,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-23T04:25:32.833Z","etag":null,"topics":["javascript","library","localstorage"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/excaliburhan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2017-03-20T05:59:18.000Z","updated_at":"2024-01-09T02:43:58.000Z","dependencies_parsed_at":"2025-01-28T10:45:42.133Z","dependency_job_id":"4f089515-c2de-4f58-bd96-4f736e46b44b","html_url":"https://github.com/excaliburhan/xp-storage","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/excaliburhan/xp-storage","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/excaliburhan%2Fxp-storage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/excaliburhan%2Fxp-storage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/excaliburhan%2Fxp-storage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/excaliburhan%2Fxp-storage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/excaliburhan","download_url":"https://codeload.github.com/excaliburhan/xp-storage/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/excaliburhan%2Fxp-storage/sbom","scorecard":{"id":387643,"data":{"date":"2025-08-11","repo":{"name":"github.com/excaliburhan/xp-storage","commit":"621f60d6f4873bff25408bdf52c8ecaf657f659a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.3,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/17 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 20 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"25 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-9j49-mfvp-vmhm","Warn: Project is vulnerable to: GHSA-ff7x-qrg7-qggm","Warn: Project is vulnerable to: GHSA-qh2h-chj9-jffq","Warn: Project is vulnerable to: GHSA-765h-qjxv-5f44","Warn: Project is vulnerable to: GHSA-f2jv-r9rf-7988","Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22","Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-4c7m-wxvm-r7gc","Warn: Project is vulnerable to: GHSA-pch5-whg9-qr2r","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-x3m3-4wpv-5vgc","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-29xr-v42j-r956","Warn: Project is vulnerable to: GHSA-cf4h-3jhx-xvhq","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T17:02:44.748Z","repository_id":18906825,"created_at":"2025-08-18T17:02:44.748Z","updated_at":"2025-08-18T17:02:44.748Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002309,"owners_count":26083340,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["javascript","library","localstorage"],"created_at":"2024-11-29T21:18:24.222Z","updated_at":"2025-10-09T23:37:46.219Z","avatar_url":"https://github.com/excaliburhan.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg width=\"100\" src=\"https://raw.githubusercontent.com/excaliburhan/xp-storage/master/logo.png\" alt=\"logo\"\u003e\u003c/p\u003e\n\n# xp-storage\n\nA lib for html5 localStorage, support expired time.\n\n## Installation\n\n\u003e npm i xp-storage --save\n\n## Usage\n\n```js\nimport { LStorage } from 'xp-storage';\n\nLStorage.set('name', 'xp', '2018-11-11 23:59:59'); // localStorage['xp_name'] = 'xp'\n\n// or with custom prefix\nimport Storage from 'xp-storage';\nconst LStorage = new Storage({ prefix: 'sheep' });\nLStorage.set('name', 'xp', '2018-11-11 23:59:59'); // localStorage['sheep_name'] = 'xp'\n```\n\n## API\n\n### set(key, value, expired)\n\n- set a key and return the value\n- Example\n\n```js\nlet name = LStorage.set('name', 'xp', '2018-11-11 23:59:59'); // xp\n```\n\n### setWithSec(key, value, expired)\n\n- set a key and expires with seconds\n- Example\n\n```js\nlet name = LStorage.setWithSec('name', 'xp', 3600); // xp, after 3600 seconds, key will be expired\n```\n\n### get(key)\n\n- return the value of key, return null if it is undefined or expired\n- Example\n\n```js\nLStorage.set('name1', 'xp');\nLStorage.set('name2', 'xp2');\nlet name1 = LStorage.get('name1'); // xp\nlet name2 = LStorage.get('name2'); // null\n```\n\n### remove(key)\n\n- remove a key and return the value of removed key, return null if it is undefined\n- Example\n\n```js\nLStorage.remove('name'); // xp\n```\n\n### keys()\n\n- get all keys in LStorage, note that expired keys will also be listed\n- Example\n\n```js\nlet keys = LStorage.keys();\n```\n\n### length()\n\n- return the length of all keys in LStorage\n- Example\n\n```js\nlet len = LStorage.length();\n```\n\n### forEach(callback)\n\n- loop all keys in LStorage and callback\n- Example\n\n```js\nLStorage.forEach((k, v) =\u003e {\n  console.log(k, v);\n});\n```\n\n### clear()\n\n- remove all keys in LStorage\n- Example\n\n```js\nLStorage.clear();\n```\n\n### getAll()\n\n- get all key and value in LStorage\n- Example\n\n```js\nLStorage.set('name1', 'xp');\nLStorage.set('name2', 'xp2');\nlet names = LStorage.getAll(); // Object { 'xp-name1': \"xp\", 'xp-name2': \"xp2\" }\n```\n\n### has()\n\n- return true if the key is defined, otherwise return false\n- Example\n\n```js\nLStorage.set('name1', 'xp');\nLStorage.has('name1'); // true\nLStorage.has('name2'); // false\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexcaliburhan%2Fxp-storage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexcaliburhan%2Fxp-storage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexcaliburhan%2Fxp-storage/lists"}