Docs: improve colour vs color consistency

API supports both, docs prefer colour
This commit is contained in:
Lovell Fuller
2024-09-06 13:40:34 +01:00
parent 807d9241bd
commit b249357732
9 changed files with 31 additions and 25 deletions

View File

@@ -8,7 +8,7 @@ const is = require('./is');
const sharp = require('./sharp');
/**
* Justication alignment
* Justification alignment
* @member
* @private
*/
@@ -26,7 +26,7 @@ const align = {
function _inputOptionsFromObject (obj) {
const { raw, density, limitInputPixels, ignoreIcc, unlimited, sequentialRead, failOn, failOnError, animated, page, pages, subifd, pdfBackground } = obj;
return [raw, density, limitInputPixels, ignoreIcc, unlimited, sequentialRead, failOn, failOnError, animated, page, pages, subifd, pdfBackground].some(is.defined)
? { raw, density, limitInputPixels, ignoreIcc, unlimited, sequentialRead, failOn, failOnError, animated, page, pages, subifd }
? { raw, density, limitInputPixels, ignoreIcc, unlimited, sequentialRead, failOn, failOnError, animated, page, pages, subifd, pdfBackground }
: undefined;
}
@@ -222,7 +222,7 @@ function _createInputDescriptor (input, inputOptions, containerOptions) {
throw is.invalidParameterError('subifd', 'integer between -1 and 100000', inputOptions.subifd);
}
}
// PDF background color
// PDF background colour
if (is.defined(inputOptions.pdfBackground)) {
this._setBackgroundColourOption('pdfBackground', inputOptions.pdfBackground);
}