Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.
/ ts-imgix Public archive

Strongly-typed imgix URL builder function, `buildImgixUrl`.

Notifications You must be signed in to change notification settings

unsplash/ts-imgix

Repository files navigation

ts-imgix

Warning

Unsupported. At time of writing we've migrated to typescript-imgix-url-params and native web URL APIs.

Strongly-typed imgix URL builder function, buildImgixUrl.

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',
);

Installation

yarn add ts-imgix
npm install ts-imgix

Development

yarn
npm run start

About

Strongly-typed imgix URL builder function, `buildImgixUrl`.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published