Easily use TinyURL in your browser.
-
Install it
$ npm install @kulkul/tinyurl-client
-
Use it
import shortenUrl from "@kulkul/tinyurl-client";
shortenUrl("https://kulkul.tech").then((result) => {
console.log({ result }); // https://tinyurl.com/<slug>
});
To use it using alias you can do the following
import shortenUrl from "@kulkul/tinyurl-client";
shortenUrl("https://kulkul.tech", "shorted-kulkul").then((result) => {
console.log({ result }); // https://tinyurl.com/shorted-kulkul
});