Skip to content

Commit

Permalink
Remove array-flatten dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
lovell committed Mar 14, 2021
1 parent 5eed87e commit 36087fe
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 1 addition & 2 deletions lib/operation.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use strict';

const { flatten: flattenArray } = require('array-flatten');
const color = require('color');
const is = require('./is');

Expand Down Expand Up @@ -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 {
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 36087fe

Please sign in to comment.