Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/Brettm12345/thumbor-ts
- Owner: Brettm12345
- License: mit
- Created: 2019-10-28T14:36:41.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-09-12T17:11:38.000Z (2 months ago)
- Last Synced: 2024-09-13T06:25:21.975Z (2 months ago)
- Topics: fp-ts, functional-programming, thumbor, thumbor-urls
- Language: TypeScript
- Homepage:
- Size: 2.91 MB
- Stars: 15
- Watchers: 2
- Forks: 2
- Open Issues: 31
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
- awesome-thumbor - GitHub - 66% open</span> · <span title="Last update timestamp on package manager" alt="Last update timestamp on package manager">⏱️ 16.03.2024</span>): (Javascript Integration & URL Generation)
README
Thumbor TS
Immutable, method chained, TypeScript DSL for building Thumbor URLs.## 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();
```