mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-08 14:38:47 +00:00
linting and cleanup
This commit is contained in:
parent
7f041e8303
commit
f74e8b9d32
51 changed files with 464 additions and 349 deletions
|
@ -15,13 +15,13 @@ const formats = {
|
|||
};
|
||||
|
||||
export function formatApiCall(api, args) {
|
||||
const match = /\{.*?\}/g;
|
||||
const find = /\{.*?\}/g;
|
||||
const replace = (match) => {
|
||||
const key = match.replace(/\{|\}/g, "");
|
||||
return args[key];
|
||||
};
|
||||
|
||||
return formats[api].replace(match, replace);
|
||||
return formats[api].replace(find, replace);
|
||||
}
|
||||
|
||||
export function formatApiUrl(widget, endpoint) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue