bibliogram/src/lib/testimports.js

8 lines
279 B
JavaScript
Raw Normal View History

2020-01-12 12:50:21 +00:00
module.exports = function(...items) {
items.forEach(item => {
if (item === undefined || (item && item.constructor && item.constructor.name == "Object" && Object.keys(item).length == 0)) {
throw new Error("Bad import: item looks like this: "+JSON.stringify(item))
}
})
}