1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-15 09:04:04 +02:00
joplin/packages/lib/models/Search.ts
2021-01-22 17:41:11 +00:00

21 lines
439 B
TypeScript

// This class doesn't appear to be used at all
import BaseModel from '../BaseModel';
export default class Search extends BaseModel {
static tableName(): string {
throw new Error('Not using database');
}
static modelType() {
return BaseModel.TYPE_SEARCH;
}
static keywords(query: string) {
let output: any = query.trim();
output = output.split(/[\s\t\n]+/);
output = output.filter((o: any) => !!o);
return output;
}
}