# tinyurl

> TinyURL.com URL Shortener Node.js Module

Latest version **1.1.7** (published 2020-08-11) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install tinyurl
pnpm add tinyurl
yarn add tinyurl
bun add tinyurl
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.1.7 |
| Published | 2020-08-11 |
| First published | 2015-06-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 26 |
| Author | JeffResc |
| Maintainers | alphat3ch |
| Keywords | TinyURL, url, short, shortener |

## Links

- npm: https://www.npmjs.com/package/tinyurl
- Repository: https://github.com/JeffResc/TinyURL-Node.js
- Issues: https://github.com/JeffResc/TinyURL-Node.js/issues
- npm.io page: https://npm.io/package/tinyurl

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 1.1.7 (latest) — 2020-08-11
- 1.1.6 — 2020-06-02
- 1.1.5 — 2020-01-03
- 1.1.4 — 2019-05-16
- 1.1.3 — 2019-05-16
- 1.1.2 — 2016-10-05
- 1.1.1 — 2016-08-26
- 1.1.0 — 2016-05-23
- 1.0.9 — 2016-05-23
- 1.0.8 — 2015-06-25
- 1.0.7 — 2015-06-25
- 1.0.6 — 2015-06-25
- 1.0.5 — 2015-06-25
- 1.0.4 — 2015-06-25
- 1.0.3 — 2015-06-25
- … 2 more at https://npm.io/package/tinyurl/versions

## README

[![NPM](https://nodei.co/npm/tinyurl.png?downloads=true&stars=true)](https://npmjs.com/package/tinyurl/)

# TinyURL [![Build Status](https://travis-ci.org/JeffResc/TinyURL-Node.js.svg?branch=master)](https://travis-ci.org/JeffResc/TinyURL-Node.js)
[http://TinyURL.com](http://tinyurl.com) URL Shortener Node.js Module

Example Shorten:

First run ```npm install TinyURL``` to install the TinyURL package to your system.

```javascript
var TinyURL = require('tinyurl');

TinyURL.shorten('http://google.com', function(res, err) {
  if (err)
    console.log(err)
	console.log(res);
});

// Shorten with Alias Example
const data = { 'url': 'https://google.com', 'alias': 'custom-alias-for-google' }

TinyURL.shortenWithAlias(data, function(res, err) {
  if (err)
    console.log(err)
	console.log(res); //Returns a shorter version of http://google.com - http://tinyurl.com/2tx
});

// Promise Example
TinyURL.shorten('http://google.com').then(function(res) {
    console.log(res)
}, function(err) {
    console.log(err)
})

// Shorten with Alias Promise Example
const data = { 'url': 'https://google.com', 'alias': 'custom-alias-for-google' }

TinyURL.shortenWithAlias(data).then(function(res) {
    console.log(res)
}, function(err) {
    console.log(err)
})

// Resolve Example
TinyURL.resolve("https://tinyurl.com/2tx").then(
  function(res) {
    console.log(res); //Returns http://google.com, the full URL located at http://tinyurl.com/2tx
  },
  function(err) {
    console.log(err);
  }
);
```

[This Package Is Licensed Under The MIT License](https://github.com/JeffResc/TinyURL-Node.js/blob/master/LICENSE.txt)

---
_Source: https://npm.io/package/tinyurl · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
