{"id":23084138,"url":"https://github.com/localforage/localforage-backbone","last_synced_at":"2025-12-12T03:47:41.693Z","repository":{"id":15087614,"uuid":"17814114","full_name":"localForage/localForage-backbone","owner":"localForage","description":"Backbone.js driver for the localForage offline storage library","archived":false,"fork":false,"pushed_at":"2015-06-26T17:10:57.000Z","size":569,"stargazers_count":68,"open_issues_count":2,"forks_count":11,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-09-21T08:23:02.441Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/localForage.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":"2014-03-17T01:44:07.000Z","updated_at":"2023-08-27T03:54:39.000Z","dependencies_parsed_at":"2022-09-22T12:40:57.299Z","dependency_job_id":null,"html_url":"https://github.com/localForage/localForage-backbone","commit_stats":null,"previous_names":["mozilla/localforage-backbone"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/localForage/localForage-backbone","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localForage%2FlocalForage-backbone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localForage%2FlocalForage-backbone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localForage%2FlocalForage-backbone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localForage%2FlocalForage-backbone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/localForage","download_url":"https://codeload.github.com/localForage/localForage-backbone/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localForage%2FlocalForage-backbone/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278254666,"owners_count":25956644,"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-10-04T02:00:05.491Z","response_time":63,"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":[],"created_at":"2024-12-16T15:49:14.779Z","updated_at":"2025-10-04T02:27:23.081Z","avatar_url":"https://github.com/localForage.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# localForage Backbone [![Build Status](https://secure.travis-ci.org/mozilla/localForage-backbone.png?branch=master)](http://travis-ci.org/mozilla/localForage-backbone)\n\nBackbone.js driver for the\n[localForage offline storage library](https://github.com/mozilla/localForage).\n\nInstall with bower:\n\n    bower install localforage-backbone\n\nRun tests with grunt:\n\n    grunt test\n\nSubmit issues, pull requests, etc. if something is up! \u003c3\n\n## Usage\n\nThis library lets you override the `sync()` method on your collections and\nmodels so they're saved to localForage instead of a REST server. Simply\noverride your objects' `sync()` method with the namespace for your model:\n\n```javascript\nvar MyModel = Backbone.Model.extend({\n    sync: Backbone.localforage.sync('MyModel')\n});\n\nvar MyCollection = Backbone.Collection.extend({\n    model: MyModel,\n    sync: Backbone.localforage.sync('MyCollection')\n});\n```\n\nNow whenever you save your collections or models, they'll be saved with\nlocalForage!\n\n## Warning\n\nThis library is only about overriding `Backbone.sync`, which means that calling `collection.remove(model)` won't update the offline storage.\n\nThe `Backbone.Collection.remove` function is only about removing a model from a collection, to clean up all references and event listeners, but does not involve a `sync` operation.\n\nIf you want to destroy a model, you should use this code instead:\n\n```javascript\n// retrieve a model by its id and destroy it\ncollection.get(id).destroy();\n\n// or\n\n// retrieve a model by its index in the collection and destroy it\ncollection.at(index).destroy();\n```\n\n# License\n\nThis program is free software; it is distributed under an\n[Apache License](http://github.com/mozilla/localForage-backbone/blob/master/LICENSE).\n\n---\n\nCopyright (c) 2014 [Mozilla](https://mozilla.org)\n([Contributors](https://github.com/mozilla/localForage-backbone/graphs/contributors)).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocalforage%2Flocalforage-backbone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flocalforage%2Flocalforage-backbone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocalforage%2Flocalforage-backbone/lists"}