# forurl

> Forurl An Free URL Shortner Api

Latest version **1.0.3** (published 2021-02-04) · MIT license · 0 weekly downloads

## Install

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

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2021-02-04 |
| First published | 2021-02-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 2.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | AzizJaber |
| Maintainers | kemzo |
| Keywords | 4url, betadevs, url, shortner, link, forurl, api, node-fetch |

## Links

- npm: https://www.npmjs.com/package/forurl
- Repository: https://github.com/azizmjaber02/forurl
- Homepage: https://github.com/azizmjaber02/forurl#readme
- Issues: https://github.com/azizmjaber02/forurl/issues
- npm.io page: https://npm.io/package/forurl

## Dependencies (1)

- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.1

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 1.0.3 (latest) — 2021-02-04
- 1.0.2 — 2021-02-04
- 1.0.1 — 2021-02-04
- 1.0.0 — 2021-02-04

## README

# ⚡ forurl
- Forurl An Free URL Shortner Api
## 😏 Some Of Features
- Json Api
- Free & Simple
- Fast & Stable Database
## 🔌 Getting Started
- You can start install the package on your project:
```bash
npm i forurl
```
- Then Start define it like this:
```javascript
const forurl = require('forurl')
```
- typescript
```ts
import forurl from 'forurl';
```
## 👀 Important Note
- **If The Full URL Already Added The Database, API Will Send The Same Data**
- **Package Use: https://4url.ml/api/short?url=fullURL**

## 💡 Some Notes
- This Package Use Node-Fetch Package
- The Package Using Official 4URL Api
- Package Just Have One Methood (Short) function
- Package Only Work With async function

## 🔋 Examples
- exmaple code:
```javascript
var forurl = require("forurl")

async function shortLink(URL) {
    const data = await forurl.Short(URL) // Json Data
    var status = data.status // Json Status
    var fullURL = data.fullURL // URL (In This Example: https://youtube.com)
    var shortCode = data.shortCode // Short Code (AutoGen)
    var shortURL = data.shortURL // https://4url.ml/:shortCode
    var clicks = data.clicks // Short Url Clicks (Req)
    var date = data.date // Date Of The ShortURL (Date.now of the req)
    if(status == 400) {
    console.log("4URL - Please Check The URL, Url is not vaild")
    } else if(status == 200) {
    console.log(`Status: ${status}\nFull URL: ${fullURL}\nShort Code: ${shortCode}\nClicks: ${clicks}\nDate: ${date}`)
    } else {
    console.log("4URL - Some Thing Wrong !!")
    }
}

shortLink("https://youtube.com") // call the function
/*
* Example Output
- status: 200
- fullURL: https://youtube.com
- shortCode: cTK4RPaIG
- shortURL: https://4url.ml/cTK4RPaIG
- clicks: 0
- date: 2021/02/04
*/
```

## 💖 Any Bug Or Suggestion !!
- Contact With Me Discord: **AzizJaber.#5414**
- Or Beta Devs [Discord](https://discord.gg/VQuhVCQyrR)

## ❗ License
[MIT](https://choosealicense.com/licenses/mit/)

## 💌 BetaDev
[Discord Server](https://discord.gg/VQuhVCQyrR)
[Website](https://betadevs.xyz)
[4URL](http://4url.ml/)

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