momo3141

logger.js

Jan 9th, 2023
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. const defaultInfoMsg = 'No info provided!';
  2.  
  3. const info = (msg = defaultInfoMsg) => {
  4. console.log(`info: ${msg}`);
  5. };
  6.  
  7. const error = (msg = defaultInfoMsg) => {
  8. console.log(`error ${msg}`);
  9. };
  10.  
  11. const success = (msg = defaultInfoMsg) => {
  12. console.log(`success ${msg}`);
  13. }
  14.  
  15. export default {
  16. info,
  17. error,
  18. success,
  19. };
  20.  
Advertisement
Add Comment
Please, Sign In to add comment