{"id":25644611,"url":"https://github.com/scssyworks/argon-storage","last_synced_at":"2025-08-30T22:13:25.364Z","repository":{"id":57183547,"uuid":"134976795","full_name":"scssyworks/argon-storage","owner":"scssyworks","description":"Argon storage plugin extends default storage API to resolve cross-browser compatibility issues","archived":false,"fork":false,"pushed_at":"2020-08-09T17:27:00.000Z","size":416,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-23T11:57:05.917Z","etag":null,"topics":["argon-storage","cookie","cookies","cross-browser","fallback","html5-storage","localstorage","sessionstorage","storage","storage-api"],"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/scssyworks.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}},"created_at":"2018-05-26T16:18:24.000Z","updated_at":"2022-07-14T06:25:30.000Z","dependencies_parsed_at":"2022-09-19T23:22:54.257Z","dependency_job_id":null,"html_url":"https://github.com/scssyworks/argon-storage","commit_stats":null,"previous_names":["scssyworks/cstorage","scssyworks/jquerystorage","scssyworks/lzstorage"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/scssyworks/argon-storage","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scssyworks%2Fargon-storage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scssyworks%2Fargon-storage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scssyworks%2Fargon-storage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scssyworks%2Fargon-storage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scssyworks","download_url":"https://codeload.github.com/scssyworks/argon-storage/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scssyworks%2Fargon-storage/sbom","scorecard":{"id":806575,"data":{"date":"2025-08-11","repo":{"name":"github.com/scssyworks/argon-storage","commit":"95015e06cf0d55b8d258059e762f9fb0dc3511c7"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"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":"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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"Code-Review","score":0,"reason":"Found 0/30 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":"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":"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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"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":"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":"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":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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"}}]},"last_synced_at":"2025-08-23T11:56:54.016Z","repository_id":57183547,"created_at":"2025-08-23T11:56:54.016Z","updated_at":"2025-08-23T11:56:54.016Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272914118,"owners_count":25014382,"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-08-30T02:00:09.474Z","response_time":77,"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":["argon-storage","cookie","cookies","cross-browser","fallback","html5-storage","localstorage","sessionstorage","storage","storage-api"],"created_at":"2025-02-23T08:29:38.992Z","updated_at":"2025-08-30T22:13:25.331Z","avatar_url":"https://github.com/scssyworks.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/scssyworks/lzstorage.svg?branch=master)](https://travis-ci.org/scssyworks/lzstorage)\n\n# Argon Storage\n\nArgon storage is a cross-browser wrapper for local storage.\n\n# Installation\n\n```sh\nnpm i argon-storage\n```\n\n# How does it work?\n\n### Argon storage test's if your current browser supports local/session storage API. If not, it stores data in cookies.\n\nWith Argon Storage\n```js\nimport ArgonStorage from 'argon-storage';\nconst store = new ArgonStorage();\n\nstore.set('dataKey', 'dataValue');\nconst value = store.get('dataKey'); // --\u003e 'dataValue'\n```\n\nWithout Argon Storage\n```js\nlet value = '';\ntry {\n    localStorage \u0026\u0026 localStorage.setItem('dataKey', 'dataValue');\n    if (localStorage) {\n        value = localStorage.getItem('dataKey'); // --\u003e 'dataValue'\n    }\n} catch(e) {\n    // Assuming you have 'setCookie' and 'getCookie' implementation available\n    setCookie('dataKey', 'dataValue');\n    value = getCookie('dataKey');\n}\n```\n\n### Argon Storage takes an extra step to verify your data and stores it correctly in local storage.\n\nWithout Argon Storage\n```js\nlocalStorage.setItem('item', { m: 'helloworld', n: 100 });\nlocalStorage.getItem('item'); // --\u003e [object Object] // Local storage stores everything as strings\n```\n\nWith Argon Storage\n```js\n...\nstore.set('item', { m: 'helloworld', n: 100 });\nstore.get('item'); // --\u003e { m: 'helloworld', n: 100 }\n```\n\nSaves an extra step of transforming data before saving it.\n\n### You can also store data in session storage. Data validations and fallback still works.\n\n```js\n...\nstore.set('item', 'value', true); // Third parameter enables session storage mode\n```\n\n### Argon Storage respects the \"type\" of data stored.\n\nWithout Argon Storage\n\n```js\nlocalStorage.set('item', true); // Stored value is boolean\nlocalStorage.get('item'); // --\u003e 'true' // Retrieved value is a string\n```\n\nWith Argon Storage\n\n```js\n...\nstore.set('item', true);\nstore.get('item'); // --\u003e true // Returns the value as boolean\n```\n\n### Argon storage supports data compression\n\nWe use Pieroxy's LZW algorithm (custom implementation) to compress input data. Useful to save some bytes when dealing with large dataset.\n\n```js\nconst store = new ArgonStorage({ compress: true });\n...\n```\n\n\n### Argon Storage provide methods to save data directly to cookies\n\n```js\nimport { setCookie, getCookie } from 'argon-storage';\n\nsetCookie('item', 'value');\ngetCookie('item'); // --\u003e 'value'\n```\n\nBy default ``setCookie`` creates a session cookie (cookie without an expiry). You can set ``expiryDays`` by passing a third parameter.\n\n```js\nsetCookie('item', 'value', 3); // Cookie expires after 3 days\n```\n\nYou can also set cookie ``path`` and ``domain`` by passing fourth and fifth parameters.\n\n```js\nsetCookie('item', 'value', null /* Setting up a session cookie */ , '/', 'example.com');\n```\n\nHowever, if you don't pass them, the path value defaults to ``/`` and domain value defaults to current site domain. If for any reason you do not want to set domain (which isn't recommended), you can pass an empty string value.\n\nYou can also mark cookies as secure by passing a sixth boolean parameter.\n\n```js\nsetCookie('item', 'value', null /* Setting up a session cookie */ , '/', 'example.com', true); // Creates a secure cookie\n```\n\nFor secure websites, you don't need to do this step. Argon storage by default creates secure cookies by checking if the site uses an ``https://`` URL.\n\n# About\n\nArgon Storage is a great utility for local storage. It is tested on majority of desktop and mobile browsers which makes it perfect for production use. It's built-in type resolution reduces a ton of code (and pain to write them). You can see it for yourself in one of the examples above.\n\nArgon Storage supports IE9 browser and above.\n\n# Additional functions/methods\n\n## Get All Cookies\n\n```js\nimport { getAllCookies } from 'argon-storage';\ngetAllCookies(); // --\u003e Returns all stored cookies as list[]\ngetAllCookies(/test_cookie/); // --\u003e Returns all stored cookies that matches the regex.\n```\n\n## Remove Cookie\n\n```js\nimport { removeCookie } from 'argon-storage';\nremoveCookie('test'); // Deletes a cookie\n```\n\n## Remove local/session storage data\n\n```js\nimport ArgonStorage from 'argon-storage';\n(new ArgonStorage())\n  .remove('item'); // Removes an item from local/session storage.\n```\n\n```js\n...\n(new ArgonStorage())\n  .remove('item', true); // Removes item from session storage only.\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscssyworks%2Fargon-storage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscssyworks%2Fargon-storage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscssyworks%2Fargon-storage/lists"}