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';
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 {