UNPKG

url-ghost-shorten

Version:

Shorten big urls for free of cost!

8 lines (7 loc) 314 B
const location = "https://url-ghost.up.railway.app/" const axios = require("axios") module.exports = async function(url) { if (!url || typeof url !== "string") throw new Error("No url given to shorten!"); const response = await axios.get(`${location}create?url=${url}`); return response.data; }