mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
15 lines
272 B
TypeScript
15 lines
272 B
TypeScript
|
export default (query: string) => {
|
||
|
if (!query) return '';
|
||
|
|
||
|
const output = [];
|
||
|
const splitted = query.split(' ');
|
||
|
|
||
|
for (let i = 0; i < splitted.length; i++) {
|
||
|
const s = splitted[i].trim();
|
||
|
if (!s) continue;
|
||
|
output.push(`${s}*`);
|
||
|
}
|
||
|
|
||
|
return output.join(' ');
|
||
|
};
|