Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/therebelrobot/backbone-deep-model-collection-search
A small monkeypatch for backbone collections to make it work with backbone-deep-model
https://github.com/therebelrobot/backbone-deep-model-collection-search
Last synced: 24 days ago
JSON representation
A small monkeypatch for backbone collections to make it work with backbone-deep-model
- Host: GitHub
- URL: https://github.com/therebelrobot/backbone-deep-model-collection-search
- Owner: therebelrobot
- License: isc
- Created: 2016-02-17T20:37:32.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-02-17T20:59:42.000Z (almost 9 years ago)
- Last Synced: 2024-12-08T12:13:38.811Z (about 2 months ago)
- Language: JavaScript
- Homepage:
- Size: 3.91 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# backbone-deep-model-collection-search
A small sideloader for backbone collections to make it work with [backbone-deep-model](https://github.com/kahwee/backbone-deep-model)### Installation
```
npm install --save backbone-deep-model-collection-search
```### Usage
```
var BackboneCollection = require('backbone-deep-model-collection-search')(Backbone.Collection)// Build your own collection from this
var List = BackboneCollection.extend({ ... })
var thisNewList = new List()
thisNewList.deepSearch({'dot.delimited.search.term':true})
// returns array of results, so for no matches [], for 2 matches [model, model]
```### Why
This stemmed out of my need to deep search collections that contain deep-linked models, as described [in this issue](https://github.com/kahwee/backbone-deep-model/issues/40).
### License
ISC