Remove array-flatten dependency

This commit is contained in:
Lovell Fuller 2021-02-27 16:34:45 +00:00
parent 5eed87ec4d
commit 36087fe518
2 changed files with 1 additions and 3 deletions

View File

@ -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 {

View File

@ -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",