1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-21 09:38:01 +02:00
joplin/ReactNativeClient/lib/models/Search.js
Laurent Cozic a96734f5be Revert "Tools: Added eslint rule arrow-parens"
This reverts commit 0b6f5581f0.

It causes too many conflicts with pull requests.
2020-05-21 09:14:33 +01:00

21 lines
383 B
JavaScript

const BaseModel = require('lib/BaseModel.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;