mirror of
https://github.com/lovell/sharp.git
synced 2025-07-14 12:50:12 +02:00
Remove array-flatten dependency
This commit is contained in:
parent
5eed87ec4d
commit
36087fe518
@ -1,6 +1,5 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const { flatten: flattenArray } = require('array-flatten');
|
|
||||||
const color = require('color');
|
const color = require('color');
|
||||||
const is = require('./is');
|
const is = require('./is');
|
||||||
|
|
||||||
@ -127,7 +126,7 @@ function flop (flop) {
|
|||||||
* @throws {Error} Invalid parameters
|
* @throws {Error} Invalid parameters
|
||||||
*/
|
*/
|
||||||
function affine (matrix, options) {
|
function affine (matrix, options) {
|
||||||
const flatMatrix = flattenArray(matrix);
|
const flatMatrix = [].concat(...matrix);
|
||||||
if (flatMatrix.length === 4 && flatMatrix.every(is.number)) {
|
if (flatMatrix.length === 4 && flatMatrix.every(is.number)) {
|
||||||
this.options.affineMatrix = flatMatrix;
|
this.options.affineMatrix = flatMatrix;
|
||||||
} else {
|
} else {
|
||||||
|
@ -117,7 +117,6 @@
|
|||||||
"vips"
|
"vips"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"array-flatten": "^3.0.0",
|
|
||||||
"color": "^3.1.3",
|
"color": "^3.1.3",
|
||||||
"detect-libc": "^1.0.3",
|
"detect-libc": "^1.0.3",
|
||||||
"node-addon-api": "^3.1.0",
|
"node-addon-api": "^3.1.0",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user