Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tastekim/tastekim-shortener

[npm] πŸ‡°πŸ‡· Easy way to make your long url shorter.
https://github.com/tastekim/tastekim-shortener

npm typescript

Last synced: 11 days ago
JSON representation

[npm] πŸ‡°πŸ‡· Easy way to make your long url shorter.

Awesome Lists containing this project

README

        

# Tastekim-Shortener
κΈ΄ url 을 가독성이 쒋은 짧은 url 둜 λ°”κΎΈμ–΄μ£ΌλŠ” λͺ¨λ“ˆμž…λ‹ˆλ‹€.
개인적으둜 μš΄μ˜ν•˜λŠ” μ„œλ²„λ₯Ό 톡해 μƒμ„±ν•˜κ³  있으며 일정 click count λ₯Ό μ²΄ν¬ν•΄μ„œ expire ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€.
`commonjs`와 `ESM`을 λͺ¨λ‘ μ§€μ›ν•©λ‹ˆλ‹€.
[Buy Me a Coffee](https://www.buymeacoffee.com/tastekim)
## Install
```
npm install @tastekim/url-shortener
```
## Usage

```typescript
import { TasteShortener } from '@tastekim/url-shortener';

const url = 'http://github.com/tastekim';
const result = await TasteShortener(url);

console.log(result);

// or

const { TasteShortener } = require('@tastekim/url-shortener');

const url = 'http://github.com/tastekim';
const result = await TasteShortener(url);

console.log(result);
```

## Output

```typescript
interface Response {
success: boolean;
message: string;
shortenUrl: string;
}
```

## Warning
* 짧은 μ‹œκ°„ λ™μ•ˆμ— shorten url 을 λ‹€λŸ‰ μƒμ„±ν•˜κ²Œ 되면 λŒ€κΈ° μ‹œκ°„μ΄ μƒκΉλ‹ˆλ‹€.