{"id":22127559,"url":"https://github.com/capjavert/web-storage-object","last_synced_at":"2026-02-11T06:01:09.218Z","repository":{"id":32793766,"uuid":"142712569","full_name":"capJavert/web-storage-object","owner":"capJavert","description":"API providing 2 way binding of JavaScript objects to browser storage","archived":false,"fork":false,"pushed_at":"2024-10-29T16:06:47.000Z","size":206,"stargazers_count":1,"open_issues_count":3,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-22T21:24:25.768Z","etag":null,"topics":["hacktoberfest","localstorage","persistence","sessionstorage","webstorage"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/web-storage-object","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/capJavert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"zenodo":null},"funding":{"github":"capJavert"}},"created_at":"2018-07-28T21:54:14.000Z","updated_at":"2023-12-16T16:29:36.000Z","dependencies_parsed_at":"2023-01-14T22:15:09.242Z","dependency_job_id":"8ede2685-cbc6-497f-ab91-556a6e641139","html_url":"https://github.com/capJavert/web-storage-object","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/capJavert/web-storage-object","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capJavert%2Fweb-storage-object","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capJavert%2Fweb-storage-object/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capJavert%2Fweb-storage-object/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capJavert%2Fweb-storage-object/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/capJavert","download_url":"https://codeload.github.com/capJavert/web-storage-object/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capJavert%2Fweb-storage-object/sbom","scorecard":{"id":264956,"data":{"date":"2025-08-11","repo":{"name":"github.com/capJavert/web-storage-object","commit":"b6e93a4f4c269889b1a5fccd887502db37b698c0"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.9,"checks":[{"name":"Code-Review","score":0,"reason":"Found 1/11 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":"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":"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":"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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"Vulnerabilities","score":0,"reason":"13 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-434g-2637-qmqr","Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m","Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw","Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p","Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747","Warn: Project is vulnerable to: GHSA-vjh7-7g9h-fjfh","Warn: Project is vulnerable to: GHSA-h7cp-r72f-jxh6","Warn: Project is vulnerable to: GHSA-v62p-rq8g-8h59","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":-1,"reason":"internal error: internal error: Client.Checks.ListCheckRunsForRef: error during graphqlHandler.setupCheckRuns: non-200 OK status code: 502 Bad Gateway body: \"\u003chtml\u003e\\r\\n\u003chead\u003e\u003ctitle\u003e502 Bad Gateway\u003c/title\u003e\u003c/head\u003e\\r\\n\u003cbody\u003e\\r\\n\u003ccenter\u003e\u003ch1\u003e502 Bad Gateway\u003c/h1\u003e\u003c/center\u003e\\r\\n\u003chr\u003e\u003ccenter\u003enginx\u003c/center\u003e\\r\\n\u003c/body\u003e\\r\\n\u003c/html\u003e\\r\\n\"","details":null,"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T11:45:35.195Z","repository_id":32793766,"created_at":"2025-08-17T11:45:35.198Z","updated_at":"2025-08-17T11:45:35.198Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29327813,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T03:52:29.695Z","status":"ssl_error","status_checked_at":"2026-02-11T03:52:23.094Z","response_time":97,"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":["hacktoberfest","localstorage","persistence","sessionstorage","webstorage"],"created_at":"2024-12-01T17:19:47.748Z","updated_at":"2026-02-11T06:01:09.199Z","avatar_url":"https://github.com/capJavert.png","language":"JavaScript","funding_links":["https://github.com/sponsors/capJavert"],"categories":[],"sub_categories":[],"readme":"# WebStorage object API\nAPI providing 2 way binding of JavaScript objects to browser WebStorage\nAPI consists of two mechanisms, each is used to bind and persist any JavaScript object to specific WebStorage type:\n- LocalStorageObject -\u003e localStorage\n- SessionStorageObject -\u003e sessionStorage\n\n## Getting started\nInclude with script tag:\n```\n\u003cscript src=\"dist/web-storage-object.min.js\"\u003e\u003c/script\u003e\n```\nor if you prefer NPM:\n```\nnpm install web-storage-object\n```\nand include as:\n```\nimport {LocalStorageObject, SessionStorageObject} from 'web-storage-object'\n```\n\n## Examples\n### Basic usage\nGiven the simple object representing our data we can use the API like this:\n```\nvar heroModel = {\n  name: 'Ogox',\n  weapon: 'Axe',\n  horse: true,\n  armor: {\n    head: 'Steel Helmet',\n    body: 'Rags',\n    boots: 'Wraps'\n  }\n}\nvar ogox = new LocalStorageObject(heroModel, 'ogox')\n```\nNow if you check localStorage inside dev tools of your browser you will see:\n\n![Chrome DevTools showcase](https://i.imgur.com/8A3r8Nl.png \"Chrome DevTools\")\n\nNow if we modify any ogox ~~weapon~~ property, lets say like this:\n```\nogox.weapon = 'Heavy Axe'\n```\nThe changes will be automatically persistant and changed inside localStorage. You can check your dev tools again. Also if you do:\n```\nconsole.log(ogox)\nconsole.log(ogox.weapon)\n```\nAs you can see it behaves just as any other object except with help of JavaScript Proxy object changes are saved and fetched from WebStorage.\n\n### Use sessionStorage\nTo use sessionStorage call the SessionStorageObject constructor.\n```\nvar ogox = new SessionStorageObject(heroModel, 'ogox')\n```\n\n### Nested objects\nIt also works out of the box with nested object properties like:\n```\nogox.armor.body = 'Heavy Armor' // updates property inside browser storage\n```\n\n### Just like any JavaScript object\nYou can define new properties just like with any JS object:\n```\nogox.armor.hands = 'Shoulder Plates'\nogox.level = 42\n```\n\n### It also supports arrays and key =\u003e value syntax\n```\nogox.items = [\n  'carrot',\n  'spoon',\n  'rotten meat'\n]\nconsole.log(ogox.items[1]) // prints 'spoon' to console\n```\n\n### Handling data already written inside browser storage\nLet's say you already have some data for the given key saved to storage and you just want to load that. You can do it like this:\n```\nvar ogox = new LocalStorageObject({}, 'ogox', false) // overwrite flag set to false\n```\nIf overwrite flag is set to false and no data exists in Storage then in this case constructor would return empty LocalStorageObject object.\n\n### Delete properties\nYou can use delete operator to delete properties, this will delete property and sync webStorage:\n```\ndelete ogox.armor.hands\ndelete ogox.level\n```\n\n## Build your own\nYou can use files inside /dist folder or build your own.\n```\n$ git clone https://github.com/capJavert/web-storage-object.git\n$ web-storage-object\n$ npm install\n```\nBuild scripts are:\n```\n$ npm run build:nouglify\n```\nor minified version:\n```\n$ npm run build\n```\n\n## Supports:\n- [x] Nested Objects\n- [x] Arrays\n- [x] Nested Arrays\n- [x] sessionStorage and localStorage\n- [x] **delete** operator\n- [x] **Object.hasOwnProperty** method\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapjavert%2Fweb-storage-object","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcapjavert%2Fweb-storage-object","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapjavert%2Fweb-storage-object/lists"}