-
Notifications
You must be signed in to change notification settings - Fork 0
getAlbumId
LakhindarPal edited this page May 12, 2024
·
1 revision
getAlbumId(
url
):number
Extracts the album ID from a given URL.
-
url:
string
The URL from which to extract the album ID.
number
- The extracted album ID, or NaN if the URL does not match the expected format.
const { getAlbumId } = require("tidal-music-api");
// example url
const url = "https://tidal.com/browse/album/230064409";
const id = getAlbumId(url);
if (id) console.log(id);
else console.log("Invalid URL");