From 36087fe518e479bab99d4dcc8a34f60694dd08c2 Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Sat, 27 Feb 2021 16:34:45 +0000 Subject: [PATCH] Remove array-flatten dependency --- lib/operation.js | 3 +-- package.json | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/operation.js b/lib/operation.js index 1075c7f5..61485cd4 100644 --- a/lib/operation.js +++ b/lib/operation.js @@ -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 { diff --git a/package.json b/package.json index 879036ea..e2c22888 100644 --- a/package.json +++ b/package.json @@ -117,7 +117,6 @@ "vips" ], "dependencies": { - "array-flatten": "^3.0.0", "color": "^3.1.3", "detect-libc": "^1.0.3", "node-addon-api": "^3.1.0",