{"id":13556013,"url":"https://github.com/alekseykulikov/storage","last_synced_at":"2025-12-12T05:54:42.048Z","repository":{"id":10328527,"uuid":"12458619","full_name":"alekseykulikov/storage","owner":"alekseykulikov","description":"Asynchronous browser storage with multiple back-ends (IndexedDB, WebSQL, localStorage)","archived":false,"fork":false,"pushed_at":"2015-03-14T17:38:15.000Z","size":382,"stargazers_count":600,"open_issues_count":2,"forks_count":20,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-10-25T22:56:59.456Z","etag":null,"topics":["indexeddb","localforage","localstorage","websql"],"latest_commit_sha":null,"homepage":"","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/alekseykulikov.png","metadata":{"files":{"readme":"Readme.md","changelog":"History.md","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":"2013-08-29T11:35:43.000Z","updated_at":"2025-07-23T17:22:35.000Z","dependencies_parsed_at":"2022-08-31T06:51:23.536Z","dependency_job_id":null,"html_url":"https://github.com/alekseykulikov/storage","commit_stats":null,"previous_names":["ask11/storage"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/alekseykulikov/storage","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alekseykulikov%2Fstorage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alekseykulikov%2Fstorage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alekseykulikov%2Fstorage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alekseykulikov%2Fstorage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alekseykulikov","download_url":"https://codeload.github.com/alekseykulikov/storage/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alekseykulikov%2Fstorage/sbom","scorecard":{"id":179138,"data":{"date":"2025-08-11","repo":{"name":"github.com/alekseykulikov/storage","commit":"7ce45bcd9b3f61ae94914fd63fcacd06760e00b1"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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"}}]},"last_synced_at":"2025-08-16T18:28:09.989Z","repository_id":10328527,"created_at":"2025-08-16T18:28:09.989Z","updated_at":"2025-08-16T18:28:09.989Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27677185,"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-12-12T02:00:06.775Z","response_time":129,"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":["indexeddb","localforage","localstorage","websql"],"created_at":"2024-08-01T12:03:33.827Z","updated_at":"2025-12-12T05:54:42.007Z","avatar_url":"https://github.com/alekseykulikov.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","others"],"sub_categories":[],"readme":"# Storage [![Build Status](https://travis-ci.org/alekseykulikov/storage.png?branch=master)](https://travis-ci.org/alekseykulikov/storage)\n\n  Storage is a functional wrapper around [localForage](https://github.com/mozilla/localForage).\n  That means it's an asynchronous browser storage with multiple back-ends (IndexedDB, WebSQL, localStorage),\n  which is built for a better offline experience.\n\n  The main differences with localForage:\n\n  - batch get/set support\n  - callbacks or promises\n  - browserify friendly\n  - simple API inspired by [yields/store](https://github.com/yields/store)\n  - development mode\n\n## Installation\n\n```\n$ npm install asyncstorage --save\n$ bower install storage\n$ component install alekseykulikov/storage\n```\n\n  Standalone build available as [./dist/storage.js](./dist/storage.js).\n\n```html\n\u003cscript src=\"storage.js\"\u003e\u003c/script\u003e\n\u003cscript\u003ewindow.storage('key', fn);\u003c/script\u003e\n```\n\n## Example\n\n```js\n// set\nstorage({ key: 'val', key2: 'val2'}, function(err) {});\n\n// get\nstorage('key', function(err, val) {});\nstorage(['key', 'key2'], function(err, all) {}); // all.length == 2\n\n// count\nstorage(function(err, count) {}); // count == 2\n\n// delete\nstorage('key', null, function(err) {});\nstorage(['key', 'key2'], null, function(err) {});\n```\n\n## API\n\n  Each method returns promise, and accepts optional callback.\n\n### storage([key, val, fn])\n\n  Main function is facade to get/set/del/count methods. It's inspired by [yields/store](https://github.com/yields/store).\n  Setting a key to `null` is equivalent to deleting the key via `storage.del(key)`.\n\n### storage.get(key, [fn])\n\n  Get `key` value.\n\n### storage.get([key1, key2, ..., keyn], [fn])\n\n  Get group of values. Callbacks return array of values for each key.\n  If key does not exist, it returns `null` on this position.\n\n### storage.set(key, val, [fn])\n\n  Set `key` to `val`.\n  You can store any kind of data, including [blobs](https://hacks.mozilla.org/2014/02/localforage-offline-storage-improved/).\n\n### storage.set({ key1: val1, key2: val2, key3: val3 }, [fn])\n\n  Run a batch operation.\n  Simple way to create, update, remove multiple records.\n  Use `null` to remove record.\n\n```js\n// assume we have 2 records\nstorage.set('foo', 7, fn)\nstorage.set('bar', ['one', 'two', 'three'], fn);\n\nstorage.set({\n  baz: 'val' // create new val\n  foo: 1000, // update `foo` value\n  bar: null, // remove `bar`\n}, function(err) {});\n```\n\n### storage.del(key, [fn])\n\n  Delete `key`.\n\n### storage.del([key1, key2, ..., keyn], [fn])\n\n  Delete a group of keys in one request.\n\n### storage.clear()\n\n  Clear storage.\n\n### storage.count()\n\n  Count records.\n\n### storage.development\n\n  Work with async code console can be unpleasant.\n  Setup development flag and storage will console.log() results of `get` or `count`.\n\n```js\nstorage.development = true;\nstorage.set({ foo: 1, bar: 2 });\nstorage.get(['foo', 'bar']);\n// =\u003e [1 ,2]\nstorage.del('bar');\nstorage.count();\n// =\u003e 1\n// shortcut to: storage.count().then(console.log.bind(console));\n```\n\n### storage.forage\n\n  It gives you access to the localForage instance.\n  You can use it to configure backend or for advanced methods as `keys` or `iterate`.\n\n```js\nstorage.forage.config({ name: 'my-name' });\nif (!window.indexedDB) storage.forage.setDriver(storage.forage.LOCALSTORAGE);\n\nstorage.forage.keys().then(function(keys) {\n  console.log(keys);\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falekseykulikov%2Fstorage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falekseykulikov%2Fstorage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falekseykulikov%2Fstorage/lists"}