diff options
| author | Terry Truong <terry06890@gmail.com> | 2022-06-28 11:05:39 +1000 |
|---|---|---|
| committer | Terry Truong <terry06890@gmail.com> | 2022-06-28 14:45:26 +1000 |
| commit | 053567d2ad81fefbd5e52e3ba15cf7511205a963 (patch) | |
| tree | f7770a23da34fa4cbf229e93aedeb38ef2cc7def /src/lib.ts | |
| parent | ea2ee038f55ed770dfb18f5cdd3a9f9797bd24ef (diff) | |
Add getImagePath() to lib.ts
Diffstat (limited to 'src/lib.ts')
| -rw-r--r-- | src/lib.ts | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -42,6 +42,10 @@ export async function getServerResponse(params: string){ } return responseObj; } +const SERVER_IMG_PATH = '/img/' +export function getImagePath(imgName: string): string { + return SERVER_IMG_PATH + imgName.replaceAll('\'', '\\\''); +} // For server search responses export type SearchSugg = { // Represents a search-string suggestion name: string, |
