mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-12 08:54:00 +02:00
21 lines
387 B
JavaScript
21 lines
387 B
JavaScript
const BaseModel = require('../BaseModel').default;
|
|
|
|
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;
|