diff --git a/src/index.js b/src/index.js index 99ef873..8e2f56a 100644 --- a/src/index.js +++ b/src/index.js @@ -8,7 +8,12 @@ const protectedproperties = (() => { .filter(prop => global[prop]); })(); -module.exports = (properties = false, jsdomConfig = {}) => { +const getType = val => Object.prototype.toString.call(val); + +module.exports = (...args) => { + const properties = args.filter(arg => getType(arg) === '[object Array]')[0]; + const jsdomConfig = args.filter(arg => getType(arg) === '[object Object]')[0]; + const window = jsdom('', jsdomConfig).defaultView; Object