'use strict';

const includes = require('lodash/includes');

// tests
module.exports = function is(element, ufo) {
  return (!ufo || typeof ufo === 'string' && element.matches && element.matches(ufo)) ||
    ((ufo instanceof Node) && element === ufo) ||
    ((ufo instanceof Array) && includes(ufo, element));
};

'use strict';

const includes = require('lodash/includes');

// tests
module.exports = function is(element, ufo) {
  return (!ufo || typeof ufo === 'string' && element.matches && element.matches(ufo)) ||
    ((ufo instanceof Node) && element === ufo) ||
    (ufo.length && includes(ufo, element));
};

Use .length instead of instanceof Array
Use .length instead of instanceof Array
