Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var Search = function(searchDoc) {
- if(!_.isEmpty(searchDoc)) this.setSearch(searchDoc);
- }
- Search.prototype.search = {};
- Search.prototype.set = function(key, value) {
- this.search[key] = value;
- }
- Search.prototype.get = function(key) {
- return this.search[key];
- }
- Search.prototype.setSearch = function(searchDoc) {
- this.search = _.assign(this.search, searchDoc);
- this.search.type = 'search';
- this.search.id = this.search._id;
- this.search.name = this.search.name;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement