{"id":21073901,"url":"https://github.com/gilf/angular2-indexeddb","last_synced_at":"2025-09-12T02:19:44.410Z","repository":{"id":57179611,"uuid":"50901603","full_name":"gilf/angular2-indexeddb","owner":"gilf","description":"angular2-indexeddb is a library that wraps indexeddb database in an Angular service.","archived":false,"fork":false,"pushed_at":"2018-11-16T15:51:16.000Z","size":74,"stargazers_count":87,"open_issues_count":12,"forks_count":43,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-30T15:23:46.150Z","etag":null,"topics":["angular","indexeddb","javascript"],"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/gilf.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":"2016-02-02T07:10:56.000Z","updated_at":"2025-03-31T10:18:35.000Z","dependencies_parsed_at":"2022-09-14T02:31:39.794Z","dependency_job_id":null,"html_url":"https://github.com/gilf/angular2-indexeddb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gilf/angular2-indexeddb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gilf%2Fangular2-indexeddb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gilf%2Fangular2-indexeddb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gilf%2Fangular2-indexeddb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gilf%2Fangular2-indexeddb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gilf","download_url":"https://codeload.github.com/gilf/angular2-indexeddb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gilf%2Fangular2-indexeddb/sbom","scorecard":{"id":426835,"data":{"date":"2025-08-11","repo":{"name":"github.com/gilf/angular2-indexeddb","commit":"85e7b2938344ecf9cabc6ae633209d04fe4ce856"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.3,"checks":[{"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":"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":"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":"Code-Review","score":2,"reason":"Found 7/24 approved changesets -- score normalized to 2","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":"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":"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":"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 13 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"}}]},"last_synced_at":"2025-08-19T02:24:40.357Z","repository_id":57179611,"created_at":"2025-08-19T02:24:40.357Z","updated_at":"2025-08-19T02:24:40.357Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274743330,"owners_count":25341134,"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-09-12T02:00:09.324Z","response_time":60,"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":["angular","indexeddb","javascript"],"created_at":"2024-11-19T19:13:36.439Z","updated_at":"2025-09-12T02:19:44.342Z","avatar_url":"https://github.com/gilf.png","language":"TypeScript","readme":"angular2-indexeddb\n==============\n\nangular2-indexeddb is a service that wraps IndexedDB database in an Angular service.\nIt exposes very simple promises API to enable the usage of IndexedDB without most of it plumbing.\n\nCopyright (C) 2017, Gil Fink \u003cgil@sparxys.com\u003e\n\nInstallation\n------------\n\nYou can choose your preferred method of installation:\n* Download from npm:\n    ```\n    npm install angular2-indexeddb\n    ```\n* Download from github: [angular2-indexeddb.min.js](https://github.com/gilf/angular2-indexeddb/blob/master/angular2-indexeddb.min.js)\n\nUsage\n-----\nInclude **angular2-indexeddb.js** in your application.\n\n```html\n\u003cscript src=\"components/angular2-indexeddb/angular2-indexeddb.js\"\u003e\u003c/script\u003e\n```\n\nImport the the `AngularIndexedDB` class as a dependency:\n\n```js\nimport {AngularIndexedDB} from 'angular2-indexeddb';\n```\n\n### AngularIndexedDB service\nFirst instantiate the service as follows:\n```js\nlet db = new AngularIndexedDB('myDb', 1);\n```\nThe first argument is the name of your database and the second is the database version.\nIf you forget the version you the service will default to version 1.\n\nUse the APIs that the AngularIndexedDB service exposes to use indexeddb.\nIn the API the following functions:\n* openDatabase(version, createCallback): opens the database for usage and update it's objectStore/s.\nThe first parameter is the version to upgrade the database and the second one is an optional callback that will handle the creation of objectStores for that version if needed.\n**openDatabase** returns a promise that is resolved when the database is open or updated or rejected if an error occurred.\n\nUsage example:\n\n```js\ndb.openDatabase(1, (evt) =\u003e {\n    let objectStore = evt.currentTarget.result.createObjectStore(\n        'people', { keyPath: \"id\", autoIncrement: true });\n\n    objectStore.createIndex(\"name\", \"name\", { unique: false });\n    objectStore.createIndex(\"email\", \"email\", { unique: true });\n});\n```\n* getByKey(storeName, key): returns the object that is stored in the objectStore by its key.\nThe first parameter is the store name to query and the second one is the object's key.\n**getByKey** returns a promise that is resolved when we have the object or rejected if an error occurred.\n\nUsage example:\n\n```js\ndb.getByKey('people', 1).then((person) =\u003e {\n    console.log(person);\n}, (error) =\u003e {\n    console.log(error);\n});\n```\n\n* getAll(storeName, keyRange, indexDetails): returns an array of all the items in the given objectStore.\nThe first parameter is the store name to query.\nThe second parameter is an optional IDBKeyRange object.\nThe third parameter is an index details which must include index name and an optional order parameter.\n**getAll** returns a promise that is resolved when we have the array of items or rejected if an error occurred.\n\nUsage example:\n\n```js\ndb.getAll('people').then((people) =\u003e {\n    console.log(people);\n}, (error) =\u003e {\n    console.log(error);\n});\n```\n\n* getByIndex(storeName, indexName, key): returns an stored item using an objectStore's index.\nThe first parameter is the store name to query, the second parameter is the index and third parameter is the item to query.\n**getByIndex** returns a promise that is resolved when the item successfully returned or rejected if an error occurred.\n\nUsage example:\n\n```js\ndb.getByIndex('people', 'name', 'Dave').then((person) =\u003e {\n    console.log(person);\n}, (error) =\u003e {\n    console.log(error);\n});\n```\n\n* add(storeName, value, key): Adds to the given objectStore the key and value pair.\nThe first parameter is the store name to modify, the second parameter is the value and the third parameter is the key (if not auto-generated).\n**add** returns a promise that is resolved when the value was added or rejected if an error occurred.\n\nUsage example (add without a key):\n\n```js\ndb.add('people', { name: 'name', email: 'email' }).then(() =\u003e {\n    // Do something after the value was added\n}, (error) =\u003e {\n    console.log(error);\n});\n```\nIn the previous example I'm using undefined as the key because the key is configured in the objectStore as auto-generated.\n\n* update(storeName, value, key?): Updates the given value in the objectStore.\nThe first parameter is the store name to modify, the second parameter is the value to update and the third parameter is the key (if there is no key don't provide it).\n**update** returns a promise that is resolved when the value was updated or rejected if an error occurred.\n\nUsage example (update without a key):\n\n```js\ndb.update('people', { id: 3, name: 'name', email: 'email' }).then(() =\u003e {\n    // Do something after update\n}, (error) =\u003e {\n    console.log(error);\n});\n```\n\n* delete(storeName, key): deletes the object that correspond with the key from the objectStore.\nThe first parameter is the store name to modify and the second parameter is the key to delete.\n**delete** returns a promise that is resolved when the value was deleted or rejected if an error occurred.\n\nUsage example:\n\n```js\ndb.delete('people', 3).then(() =\u003e {\n    // Do something after delete\n}, (error) =\u003e {\n    console.log(error);\n});\n```\n\n* openCursor(storeName, cursorCallback, keyRange): opens an objectStore cursor to enable iterating on the objectStore.\nThe first parameter is the store name, the second parameter is a callback function to run when the cursor succeeds to be opened and the third parameter is optional IDBKeyRange object.\n**openCursor** returns a promise that is resolved when the cursor finishes running or rejected if an error occurred.\n\nUsage example:\n\n```js\ndb.openCursor('people', (evt) =\u003e {\n    var cursor = (\u003cany\u003eevt.target).result;\n    if(cursor) {\n        console.log(cursor.value);\n        cursor.continue();\n    } else {\n        console.log('Entries all displayed.');\n    }\n}, IDBKeyRange.bound(\"A\", \"F\"));\n\n```\n\n* clear(storeName): clears all the data in an objectStore.\nThe first parameter is the store name to clear.\n**clear** returns a promise that is resolved when the objectStore was cleared or rejected if an error occurred.\n\nUsage example:\n\n```js\ndb.clear('people').then(() =\u003e {\n    // Do something after clear\n}, (error) =\u003e {\n    console.log(error);\n});\n\n```\n\nLicense\n----\n\nReleased under the terms of the [MIT License](LICENSE).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgilf%2Fangular2-indexeddb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgilf%2Fangular2-indexeddb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgilf%2Fangular2-indexeddb/lists"}