mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-30 10:36:35 +02:00
23 lines
428 B
JavaScript
23 lines
428 B
JavaScript
const BaseModel = require('lib/BaseModel.js');
|
|
const Note = require('lib/models/Note.js');
|
|
|
|
class Search extends BaseModel {
|
|
|
|
static tableName() {
|
|
throw new Error('Not using database');
|
|
}
|
|
|
|
static modelType() {
|
|
return BaseModel.TYPE_SEARCH;
|
|
}
|
|
|
|
static keywords(query) {
|
|
let output = query.trim();
|
|
output = output.split(/[\s\t\n]+/);
|
|
output = output.filter(o => !!o);
|
|
return output;
|
|
}
|
|
|
|
}
|
|
|
|
module.exports = Search; |