log.js 272 B

123456789101112131415
  1. function log(o) {
  2. if(typeof o === "object" && "_" in o) {
  3. const obj = {...o};
  4. delete obj._;
  5. return console.log(obj);
  6. }
  7. return console.log(o);
  8. }
  9. log.info = function(v) {
  10. console.log(v + "\n" + "-".repeat(10));
  11. }
  12. export {log}