bibliogram/src/lib/testimports.js

10 lines
338 B
JavaScript
Raw Normal View History

2020-01-12 12:50:21 +00:00
module.exports = function(...items) {
2020-01-18 15:38:14 +00:00
items.forEach((item, index) => {
2020-01-12 12:50:21 +00:00
if (item === undefined || (item && item.constructor && item.constructor.name == "Object" && Object.keys(item).length == 0)) {
2020-01-18 15:38:14 +00:00
console.log(`Bad import for arg index ${index}`)
// @ts-ignore
require("/") // generate an error with a require stack.
2020-01-12 12:50:21 +00:00
}
})
}