Take in functions as defaults

This commit is contained in:
1ilit
2024-04-24 11:49:00 +03:00
parent ca8ee61ee9
commit 2751a6d6df
3 changed files with 9 additions and 3 deletions

View File

@@ -24,3 +24,7 @@ export function strHasQuotes(str) {
(str[0] === str[str.length - 1] && str[0] === "`")
);
}
export function isFunction(str) {
return /\w+\([^)]*\)$/.test(str);
}