Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: static targetWidths functionality #248

Merged
merged 1 commit into from
Mar 5, 2021
Merged

Conversation

ericdeansanchez
Copy link
Contributor

@ericdeansanchez ericdeansanchez commented Mar 4, 2021

The purpose of this PR is to extend targetWidths functionality to
users via a static class function. A static function has been used to
preserve the import syntax for UMD, CommonJS, and ES6 modules.

Previously, this function was named _generateTargetWidths which
required users to instantiate an ImgixClient object to use it. Now,
this function has been renamed and re-implemented as a static function.

Previously, the parameter order required widthTolerance, minWidth,
and then maxWidth. The order has been changed in accordance with
how common a particular argument is expected to be passed:

targetWidths(minWidth, maxWidth, widthTolerance, cache)

@ericdeansanchez ericdeansanchez requested a review from a team as a code owner March 4, 2021 22:48
@commit-lint
Copy link

commit-lint bot commented Mar 4, 2021

Features

  • static targetWidths functionality (d26946a)

Contributors

ericdeansanchez

Commit-Lint commands

You can trigger Commit-Lint actions by commenting on this PR:

  • @Commit-Lint merge patch will merge dependabot PR on "patch" versions (X.X.Y - Y change)
  • @Commit-Lint merge minor will merge dependabot PR on "minor" versions (X.Y.Y - Y change)
  • @Commit-Lint merge major will merge dependabot PR on "major" versions (Y.Y.Y - Y change)
  • @Commit-Lint merge disable will desactivate merge dependabot PR
  • @Commit-Lint review will approve dependabot PR
  • @Commit-Lint stop review will stop approve dependabot PR

@ericdeansanchez ericdeansanchez merged commit 2afd7c4 into main Mar 5, 2021
@ericdeansanchez ericdeansanchez deleted the target-widths branch March 5, 2021 00:20
@frederickfogerty
Copy link
Contributor

Thanks so much for this @ericdeansanchez! Could we please update the TS definitions to include this change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants