1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-12 08:54:00 +02:00
joplin/packages/lib/models/Search.js

21 lines
387 B
JavaScript
Raw Normal View History

2020-11-05 18:58:23 +02:00
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;
}
}
2019-07-29 15:43:53 +02:00
module.exports = Search;