const log = o => { if (typeof o !== 'object') throw new Error('log message should be an object') if (!o.type) throw new Error('log message should have a type') console.log(JSON.stringify(o)) } module.exports = log