JSFiddle - React, Tailwind, and code Playground

by Gerald Gillespie

JavaScript

const log = {
  error: ({
    title,
    details
  }) => console.log({
    title,
    details
  })
};

try {
  throw Error('wtf');
} catch (error) {
console.log(error);
  (({
    name: title,
    message
  }) => log.error({
    title,
    details
  }))({
    ...error
  });
}