mirror of https://git.sr.ht/~cadence/bibliogram
8 lines
279 B
JavaScript
8 lines
279 B
JavaScript
|
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))
|
||
|
}
|
||
|
})
|
||
|
}
|