Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/Brettm12345/thumbor-ts

Immutable TypeScript client for building Thumbor URLs
https://github.com/Brettm12345/thumbor-ts

fp-ts functional-programming thumbor thumbor-urls

Last synced: 16 days ago
JSON representation

Immutable TypeScript client for building Thumbor URLs

Awesome Lists containing this project

README

        


Thumbor TS


Immutable, method chained, TypeScript DSL for building Thumbor URLs.








Minzipped Size


















## Installation

- `yarn add thumbor-ts`
- `pnpm i thumbor-ts`
- `npm i --save thumbor-ts`

## Usage

```typescript
import Thumbor from 'thumbor-ts';

// Your encryption key is not required, but your link will be unsafe.
const thumbor = Thumbor({
serverUrl: 'http://myserver.thumbor.com',
securityKey: 'MY_KEY'
});

// Generate your url
const thumborUrl = thumbor
.setPath('00223lsvrnzeaf42.png')
.resize(50, 50)
.smartCrop()
.format('webp')
.buildUrl();
```