Create post viewer

This commit is contained in:
Cadence Fish
2020-01-19 04:38:14 +13:00
parent 693c083a99
commit 59d891b94b
19 changed files with 479 additions and 84 deletions

View File

@@ -1,7 +1,9 @@
module.exports = function(...items) {
items.forEach(item => {
items.forEach((item, index) => {
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))
console.log(`Bad import for arg index ${index}`)
// @ts-ignore
require("/") // generate an error with a require stack.
}
})
}