2017-07-24 17:12:38 +02:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
const { inspect } = require('util');
|
|
|
|
|
2017-10-04 23:57:47 +05:30
|
|
|
/**
|
|
|
|
* @param {Error} err
|
|
|
|
* Logs errors to console
|
2017-10-06 18:15:28 +02:00
|
|
|
* @returns {undefined}
|
2017-10-04 23:57:47 +05:30
|
|
|
*/
|
2017-09-27 23:12:12 +03:30
|
|
|
const logError = err => console.error(err);
|
2017-09-24 18:34:32 +02:00
|
|
|
|
2017-10-04 23:57:47 +05:30
|
|
|
/**
|
|
|
|
* @param {Object} value
|
|
|
|
* Echos the value of a value.
|
2017-10-06 18:15:28 +02:00
|
|
|
* @returns {undefined}
|
2017-10-04 23:57:47 +05:30
|
|
|
*/
|
2017-07-24 17:12:38 +02:00
|
|
|
const print = value =>
|
|
|
|
console.log(inspect(value, { colors: true, depth: null }));
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
logError,
|
|
|
|
print
|
|
|
|
};
|