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