We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 54e5d23 commit c0088ecCopy full SHA for c0088ec
1 file changed
index.js
@@ -72,7 +72,7 @@ class Shortcut {
72
* @param {string} url The landing page URL of a shortcut.
73
* @returns {(boolean|string)} The ID, or false if unparsable or not a shortcut URL.
74
*/
75
-function shortcutFromURL(url = "https://example.org") {
+function idFromURL(url = "https://example.org") {
76
try {
77
const parsedUrl = new URL(url);
78
const path = parsedUrl.pathname.split("/").splice(1);
@@ -104,6 +104,6 @@ function getShortcutDetails(id) {
104
105
module.exports = {
106
Shortcut,
107
- shortcutFromURL,
+ idFromURL,
108
getShortcutDetails,
109
};
0 commit comments