Check if the object contain an affine matrix
@param object
@return {boolean}
509016
function isAffineMatrix(object) {
    return isObject(object) && object.hasOwnProperty('a') && isNumeric(object.a) && object.hasOwnProperty('b') && isNumeric(object.b) && object.hasOwnProperty('c') && isNumeric(object.c) && object.hasOwnProperty('d') && isNumeric(object.d) && object.hasOwnProperty('e') && isNumeric(object.e) && object.hasOwnProperty('f') && isNumeric(object.f);
}
807368
function each(object, callback) {
		if (!object) { return true; }
		if (object.forEach) { return object.forEach(callback); }
		if (object instanceof Array) {
			var	length	= array ? array.length : 0;
			for(var index = 0; index < length; index++) {
				callback(array[index], index);
			}
		}else{
			for(var key in object) {
				if (!object.hasOwnProperty(key)) { continue; }
				callback(object[key], key);
			}
		}
		return false;
	}
441287
function isModel(object) {
    if (!object || typeof object !== 'object') {
        return false;
    }
    else if ('isModel' in object) {
        diag.debug.assert(function () { return object.isModel === Model.prototype.isPrototypeOf(object); });
        return object.isModel;
    }
    else {
        return Model.prototype.isPrototypeOf(object);
    }
}
223275
function has(obj, ...args) {
  if (obj === undefined) {
    return false;
  }

  const keys = Array.prototype.slice.apply(args);
  const length = keys.length;
  let object = obj;

  for (let i = 0; i < length; i++) {
    if (!object || !hasOwnProperty.call(object, keys[i])) {
      return false;
    }

    object = object[keys[i]];
  }

  return true;
}
1182020
function(matrix) {
  const rows = matrix.length;
  const columns = matrix[0].length;
  const res = [];
  for (let row = 0; row < rows; ++row) {
    res.push([]);
    for (let column = 0; column < columns; ++column) {
      res[row][column] = matrix[column][columns - row - 1];
    }
  }
  return res;
}
625225
function matrix(rows, columns, values) {
    // console.log(values);
    const res = [];
    let row = [];
    let real;
    values.forEach((v, i) => {
        if (i % 2 == 0) {
            real = v;
        } else {
            row.push({
                real: real,
                imag: v
            });
            if ((i + 1) / 2 % columns == 0) {
                res.push(row);
                row = [];
            }
        }
    });
    return res;
}
1166853
function(matrix) {
    var M = matrix.elements || matrix;
    if (typeof(M[0][0]) == 'undefined') { M = Matrix.create(M).elements; }
    if (this.elements.length != M.length ||
        this.elements[0].length != M[0].length) { return false; }
    var ni = this.elements.length, ki = ni, i, nj, kj = this.elements[0].length, j;
    do { i = ki - ni;
      nj = kj;
      do { j = kj - nj;
        if (Math.abs(this.elements[i][j] - M[i][j]) > Sylvester.precision) { return false; }
      } while (--nj);
    } while (--ni);
    return true;
  }
943119
function Matrix() {
  var m = Array.prototype.concat.apply([], arguments);
  if (!m.length) {
    m = [
      1, 0, 0, 0,
      0, 1, 0, 0,
      0, 0, 1, 0,
      0, 0, 0, 1
    ];
  }
  this.m = hasFloat32Array ? new Float32Array(m) : m;
}
1188284
function checkCircular(obj){
    let isCcl = false;
    let cclKeysArr = [];
    travelJson(obj,function(k,v,kp,ts,cpl,cd,isCircular){
        if(isCircular){
            isCcl = true;
            cclKeysArr.push({
                keyPath: kp,
                circularTo: v.slice(11,-1),
                key: k,
                value: v
            });
        }
    },"ROOT",true);
    return {
        isCircular: isCcl,
        circularProps: cclKeysArr
    };
}
987389
function(obj) {
                if (obj.normal) { return null; }
                if (obj.direction) {
                  return (this.contains(obj.anchor) && this.contains(obj.anchor.add(obj.direction)));
                } else {
                  var P = obj.elements || obj;
                  var A = this.anchor.elements, N = this.normal.elements;
                  var diff = Math.abs(N[0]*(A[0] - P[0]) + N[1]*(A[1] - P[1]) + N[2]*(A[2] - (P[2] || 0)));
                  return (diff <= sylvester.precision);
                }
              }
377863
function isFlat(object) {
  return isObject(object) && (isNull(Object.getPrototypeOf(object)) ||
                              isNull(Object.getPrototypeOf(
                                     Object.getPrototypeOf(object))));
}
814834
function _isArrayOfObjects(value) {
  if (!Array.isArray(value)) {
    return false;
  }
  var l = value.length;
  var _type, cond;
  for (var i = 0; i < l; i++) {
    _type = typeof value[i];
    cond = _type === 'function' || _type === 'object' && !!value[i];
    if (!cond) {
      return false;
    }
  }
  return true;
}
798486
function isGetSet(obj) {
        var keys, length;
        if (obj && typeof obj === 'object') {
            keys = Object.getOwnPropertyNames(obj)
                .sort();
            length = keys.length;

            if ((length === 1 && (keys[0] === 'get' && typeof obj.get ===
                    'function' ||
                    keys[0] === 'set' && typeof obj.set === 'function'
                )) ||
                (length === 2 && (keys[0] === 'get' && typeof obj.get ===
                    'function' &&
                    keys[1] === 'set' && typeof obj.set === 'function'
                ))) {
                return true;
            }
        }
        return false;
    }
534672
function(obj) {
		var prop;

		if (!obj || typeOf(obj) !== 'object') {
			return true;
		}

		for (prop in obj) {
			return false;
		}

		return true;
	}
898706
function(sbm) {
    // if the matrix ain't square, symmetry is off
    if (sbm.x !== sbm.y) {
      return false
    }

    // symmetry status
    var symmetry = true
    // iterate
    for (var i = 0; i < sbm.x; i++) {
      for (var j = 0; j <= i; j++) {
        symmetry = symmetry && ((_.includes(sbm.data[i], j) ^ _.includes(sbm.data[j], i)) === 0)
      }
    }
    // return
    return symmetry
  }
1250173
function(obj) {
                if (obj.start && obj.end) { return this.contains(obj.start) && this.contains(obj.end); }
                var P = (obj.elements || obj).slice();
                if (P.length == 2) { P.push(0); }
                if (this.start.eql(P)) { return true; }
                var S = this.start.elements;
                var V = vector.create([S[0] - P[0], S[1] - P[1], S[2] - (P[2] || 0)]);
                var vect = this.toVector();
                return V.isAntiparallelTo(vect) && V.modulus() <= vect.modulus();
              }
75193
function autoValidate(object) {
  const seq = (object) ? object.seq : undefined;
  const action = (object) ? object.action : undefined;

  const schema = identifySchema(object)

  if (schema) {
    const {error, value} = validate(object, schema);

    if (error) {
      return { isValid: false, seq, action, error };
    } else {
      return { isValid: true, seq, action, value };
    }
  } else {
    return { isValid: false, seq, action,
      error: new Error('No matching schema found.') };
  }
}