Skip to content

Commit c0088ec

Browse files
committed
Rename shortcutFromURL to better fit its function
1 parent 54e5d23 commit c0088ec

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class Shortcut {
7272
* @param {string} url The landing page URL of a shortcut.
7373
* @returns {(boolean|string)} The ID, or false if unparsable or not a shortcut URL.
7474
*/
75-
function shortcutFromURL(url = "https://example.org") {
75+
function idFromURL(url = "https://example.org") {
7676
try {
7777
const parsedUrl = new URL(url);
7878
const path = parsedUrl.pathname.split("/").splice(1);
@@ -104,6 +104,6 @@ function getShortcutDetails(id) {
104104

105105
module.exports = {
106106
Shortcut,
107-
shortcutFromURL,
107+
idFromURL,
108108
getShortcutDetails,
109109
};

0 commit comments

Comments
 (0)