Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/unsplash/ts-imgix
Strongly-typed imgix URL builder function, `buildImgixUrl`.
https://github.com/unsplash/ts-imgix
imgix
Last synced: 3 days ago
JSON representation
Strongly-typed imgix URL builder function, `buildImgixUrl`.
- Host: GitHub
- URL: https://github.com/unsplash/ts-imgix
- Owner: unsplash
- Created: 2018-12-14T14:52:23.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-01-16T16:40:50.000Z (10 months ago)
- Last Synced: 2024-08-02T13:35:37.982Z (3 months ago)
- Topics: imgix
- Language: TypeScript
- Homepage:
- Size: 233 KB
- Stars: 33
- Watchers: 4
- Forks: 4
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ts-imgix
> [!WARNING]
> Unsupported. At time of writing we've migrated to [typescript-imgix-url-params](https://github.com/imgix/typescript-imgix-url-params) and native web URL APIs.Strongly-typed imgix URL builder function, `buildImgixUrl`.
```ts
import * as assert from 'assert';
import { buildImgixUrl } from 'ts-imgix';assert.strictEqual(
buildImgixUrl('https://foo.com')({
auto: {
format: true,
},
w: 300,
}),
'https://foo.com/?auto=format&w=300',
);
```![](./demo1.png)
![](./demo2.png)
![](./demo3.png)## Installation
```sh
yarn add ts-imgix
npm install ts-imgix
```## Development
```
yarn
npm run start
```