Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 1.04 KB

README.md

File metadata and controls

33 lines (22 loc) · 1.04 KB

TinyURL JavaScript Client

Contact me on Codementor Made in Indonesia Build Status

Easily use TinyURL in your browser.

Getting Started

  1. Install it

     $ npm install @kulkul/tinyurl-client
    
  2. 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
});