Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

consoleFunc.js 759B

123456789101112131415161718192021222324252627
  1. 'use strict';
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = consoleFunc;
  6. var _wrapAsync = require('./wrapAsync');
  7. var _wrapAsync2 = _interopRequireDefault(_wrapAsync);
  8. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  9. function consoleFunc(name) {
  10. return (fn, ...args) => (0, _wrapAsync2.default)(fn)(...args, (err, ...resultArgs) => {
  11. if (typeof console === 'object') {
  12. if (err) {
  13. if (console.error) {
  14. console.error(err);
  15. }
  16. } else if (console[name]) {
  17. resultArgs.forEach(x => console[name](x));
  18. }
  19. }
  20. });
  21. }
  22. module.exports = exports['default'];