From 76cda885fba19c3c8b7d060225a0ba2d78c1dfac Mon Sep 17 00:00:00 2001 From: Peter Whidden Date: Wed, 9 Nov 2022 03:44:05 -0500 Subject: [PATCH] Docs: fix minor typo in resize properties (#3444) --- docs/api-resize.md | 4 ++-- lib/resize.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/api-resize.md b/docs/api-resize.md index 9178c97e..98aeab0e 100644 --- a/docs/api-resize.md +++ b/docs/api-resize.md @@ -45,8 +45,8 @@ Previous calls to `resize` in the same pipeline will be ignored. * `height` **[number][8]?** pixels high the resultant image should be. Use `null` or `undefined` to auto-scale the height to match the width. * `options` **[Object][9]?** - * `options.width` **[String][10]?** alternative means of specifying `width`. If both are present this take priority. - * `options.height` **[String][10]?** alternative means of specifying `height`. If both are present this take priority. + * `options.width` **[String][10]?** alternative means of specifying `width`. If both are present this takes priority. + * `options.height` **[String][10]?** alternative means of specifying `height`. If both are present this takes priority. * `options.fit` **[String][10]** how the image should be resized to fit both provided dimensions, one of `cover`, `contain`, `fill`, `inside` or `outside`. (optional, default `'cover'`) * `options.position` **[String][10]** position, gravity or strategy to use when `fit` is `cover` or `contain`. (optional, default `'centre'`) * `options.background` **([String][10] | [Object][9])** background colour when `fit` is `contain`, parsed by the [color][11] module, defaults to black without transparency. (optional, default `{r:0,g:0,b:0,alpha:1}`) diff --git a/lib/resize.js b/lib/resize.js index b7b208ad..33d98318 100644 --- a/lib/resize.js +++ b/lib/resize.js @@ -217,8 +217,8 @@ function isResizeExpected (options) { * @param {number} [width] - pixels wide the resultant image should be. Use `null` or `undefined` to auto-scale the width to match the height. * @param {number} [height] - pixels high the resultant image should be. Use `null` or `undefined` to auto-scale the height to match the width. * @param {Object} [options] - * @param {String} [options.width] - alternative means of specifying `width`. If both are present this take priority. - * @param {String} [options.height] - alternative means of specifying `height`. If both are present this take priority. + * @param {String} [options.width] - alternative means of specifying `width`. If both are present this takes priority. + * @param {String} [options.height] - alternative means of specifying `height`. If both are present this takes priority. * @param {String} [options.fit='cover'] - how the image should be resized to fit both provided dimensions, one of `cover`, `contain`, `fill`, `inside` or `outside`. * @param {String} [options.position='centre'] - position, gravity or strategy to use when `fit` is `cover` or `contain`. * @param {String|Object} [options.background={r: 0, g: 0, b: 0, alpha: 1}] - background colour when `fit` is `contain`, parsed by the [color](https://www.npmjs.org/package/color) module, defaults to black without transparency.