{"id":21320097,"url":"https://github.com/xieyezi/webstorage","last_synced_at":"2025-03-15T22:29:01.654Z","repository":{"id":118588195,"uuid":"177767680","full_name":"xieyezi/webStorage","owner":"xieyezi","description":"一个将localStorage和sessionStorage统一封装的NPM包","archived":false,"fork":false,"pushed_at":"2019-03-28T02:43:38.000Z","size":18,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-07T20:51:57.709Z","etag":null,"topics":["localstorage","sessionstorage","web"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/xieyezi-storage","language":"JavaScript","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/xieyezi.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":"2019-03-26T10:42:03.000Z","updated_at":"2024-02-24T07:27:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"fcce4c5b-7478-4609-ab5e-9f4d94eef97d","html_url":"https://github.com/xieyezi/webStorage","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xieyezi%2FwebStorage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xieyezi%2FwebStorage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xieyezi%2FwebStorage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xieyezi%2FwebStorage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xieyezi","download_url":"https://codeload.github.com/xieyezi/webStorage/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243801379,"owners_count":20350104,"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":["localstorage","sessionstorage","web"],"created_at":"2024-11-21T19:45:08.869Z","updated_at":"2025-03-15T22:29:01.627Z","avatar_url":"https://github.com/xieyezi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"### webStorage\n  一个将localStorage和sesionStorage封装到一起的包.\n\n  ![](https://img.shields.io/badge/rollup-v1.7.3-green.svg)       ![](https://img.shields.io/badge/npm-6.4.1-green.svg)       ![](https://img.shields.io/badge/loaclStorage-webStorage-blue.svg) ![](https://img.shields.io/badge/sessionStorage-webStorage-blue.svg) \n\n  * [x] localStorage\n  * [x] sessionStorage\n#### 安装\n\n ```js\n  npm install xieyezi-storage\n ```\n #### 用法\n\n```js\nimport xieyeziStorage form 'xieyezi-storage';\n```\n\nlocalStorage设置storage:\n```js\n storage.set(key,val);\n```\nsessionStorage设置storage:\n```js\nstorage.session.set(key, val);\n```\n\nlocalStorage获取storage:\n```js\n storage.get(key,val) ;\n```\nsessionStorage获取storage:\n```js\nstorage.session.get(key, val);\n```\n\n#### API\n\nset(key,value):\n\nget(key,def);\n\nremove(key);\n\nhas(key);\n\nclear();\n\ngetAll();\n\nforEach(callback);\n\n\n\n\n\n  \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxieyezi%2Fwebstorage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxieyezi%2Fwebstorage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxieyezi%2Fwebstorage/lists"}