Skip to content

Easily use TinyURL in your JavaScript app. This library is no longer maintained.

Notifications You must be signed in to change notification settings

kulkultech/tinyurl-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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/<random-slug>
});

Important Note on Custom Aliases

Custom aliases are no longer supported. The underlying TinyURL API endpoint used by this client does not support custom aliases. Any alias parameter provided will be ignored, and a random slug will be generated instead.

import shortenUrl from "@kulkul/tinyurl-client";

// Alias parameter is deprecated and will be ignored
shortenUrl("https://kulkul.tech", "my-custom-alias").then((result) => {
    console.log({ result }); // https://tinyurl.com/<random-slug> (NOT my-custom-alias)
});

About

Easily use TinyURL in your JavaScript app. This library is no longer maintained.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •