https://github.com/richienb/tinyurl-api
Shorten a url with TinyURL.
https://github.com/richienb/tinyurl-api
Last synced: 9 months ago
JSON representation
Shorten a url with TinyURL.
- Host: GitHub
- URL: https://github.com/richienb/tinyurl-api
- Owner: Richienb
- License: mit
- Created: 2020-04-30T00:10:17.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-04-30T14:03:36.000Z (over 5 years ago)
- Last Synced: 2025-04-22T07:51:28.967Z (9 months ago)
- Language: JavaScript
- Homepage:
- Size: 12.7 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# tinyurl-api [](https://travis-ci.com/Richienb/tinyurl-api)
Shorten a url with TinyURL.
[](https://npmjs.com/package/tinyurl-api)
## Install
```sh
npm install tinyurl-api
```
## Usage
```js
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.