Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

tinyurl-api

Richienb1.2kMIT1.0.1TypeScript support: included

Shorten a url with TinyURL.

url, tinyurl, shorten, alias, request

readme

tinyurl-api Travis CI Build Status

Shorten a url with TinyURL.

NPM Badge

Install

npm install tinyurl-api

Usage

const tinyurl = require("tinyurl-api");

(async () => {
    const url = await tinyurl("https://google.com");

    console.log(url);
})();

API

tinyurl(url, alias?)

url

Type: string

The url to shorten.

alias

Type: string

The custom alias for the shortened url.