mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Remove array-flatten dependency
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const { flatten: flattenArray } = require('array-flatten');
|
||||
const color = require('color');
|
||||
const is = require('./is');
|
||||
|
||||
@@ -127,7 +126,7 @@ function flop (flop) {
|
||||
* @throws {Error} Invalid parameters
|
||||
*/
|
||||
function affine (matrix, options) {
|
||||
const flatMatrix = flattenArray(matrix);
|
||||
const flatMatrix = [].concat(...matrix);
|
||||
if (flatMatrix.length === 4 && flatMatrix.every(is.number)) {
|
||||
this.options.affineMatrix = flatMatrix;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user