mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-30 10:36:35 +02:00
23 lines
662 B
TypeScript
23 lines
662 B
TypeScript
// This class doesn't appear to be used at all
|
|
|
|
import BaseModel from '../BaseModel';
|
|
|
|
export default class Search extends BaseModel {
|
|
public static tableName(): string {
|
|
throw new Error('Not using database');
|
|
}
|
|
|
|
public static modelType() {
|
|
return BaseModel.TYPE_SEARCH;
|
|
}
|
|
|
|
public static keywords(query: string) {
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
|
let output: any = query.trim();
|
|
output = output.split(/[\s\t\n]+/);
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
|
output = output.filter((o: any) => !!o);
|
|
return output;
|
|
}
|
|
}
|