diff options
| author | Kiran George <kirangeorge1995@gmail.com> | 2025-06-09 11:30:08 +0530 |
|---|---|---|
| committer | Kiran George <kirangeorge1995@gmail.com> | 2025-06-09 11:30:08 +0530 |
| commit | 952aa63147c9fb28f6ace6f0bc7ccf45ced1299a (patch) | |
| tree | 306e6d86603a162c00bc5113b56baac0fe7bec7c /config/quickshell/modules/common/functions/file_utils.js | |
| parent | 4cf0d0bd5930da76e60f6770de3ee97c10ca7024 (diff) | |
Overview v2
Diffstat (limited to 'config/quickshell/modules/common/functions/file_utils.js')
| -rw-r--r-- | config/quickshell/modules/common/functions/file_utils.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/config/quickshell/modules/common/functions/file_utils.js b/config/quickshell/modules/common/functions/file_utils.js new file mode 100644 index 00000000..758950de --- /dev/null +++ b/config/quickshell/modules/common/functions/file_utils.js @@ -0,0 +1,9 @@ +/** + * Trims the File protocol off the input string + * @param {string} str + * @returns {string} + */ +function trimFileProtocol(str) { + return str.startsWith("file://") ? str.slice(7) : str; +} + |
