# ng-tiny-url

> Angular 6+ library to shorten url

Latest version **1.0.2** (published 2021-01-16) · 0 weekly downloads

## Install

```sh
npm install ng-tiny-url
pnpm add ng-tiny-url
yarn add ng-tiny-url
bun add ng-tiny-url
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2021-01-16 |
| First published | 2021-01-15 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 21.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Kelvin Esekhile |
| Maintainers | cozmik05 |
| Keywords | Url, short url, url shortener, ng tinyUrl, tinyUrl |

## Links

- npm: https://www.npmjs.com/package/ng-tiny-url
- Repository: https://github.com/cozmik/ng-tinyUrl
- Homepage: https://github.com/cozmik/ng-tinyUrl/blob/main/README.md
- Issues: https://github.com/cozmik/ng-tinyUrl/issues
- npm.io page: https://npm.io/package/ng-tiny-url

## Dependencies (1)

- [tslib](https://npm.io/package/tslib.md) ^2.0.0

## 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.0.2 (latest) — 2021-01-16
- 1.0.1 — 2021-01-15
- 1.0.0 — 2021-01-15

## README

# NgTinyUrl

An angular library to shorten url using [TinyUrl](https://tinyurl.com/) api. Works on angular version 6+

## Installation

To install this library, run:

```bash
$ npm install ng-tiny-url
```

## Usage

```typescript

import {NgTinyUrlModule} from 'ng-tiny-url';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    NgTinyUrlModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
```

Once imported in your module, inject the NgTinyUrlService into your component as shown below: 

```typescript
import {NgTinyUrlService} from 'ng-tiny-url';


export class AppComponent {
  title = 'tinyUrlTest';
  shortenedUrl = '';

  constructor(private tinyUrl: NgTinyUrlService) {
      this.tinyUrl.shorten('www.google.com').subscribe(res => {
        this.shortenedUrl = res;
        console.log(res); // https://tinyurl.com/8wa5w2o;
      });
    }
}
```

## License

MIT © [Kelvin Esekhile](mailto:kelvinoesekhile@gmail.com)

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