MCPcopy Create free account
hub / github.com/PrairieLearn/PrairieLearn / _console_fn

Function _console_fn

public/javascripts/async.js:1061–1078  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

1059 };
1060
1061 function _console_fn(name) {
1062 return _restParam(function (fn, args) {
1063 fn.apply(null, args.concat([_restParam(function (err, args) {
1064 if (typeof console === 'object') {
1065 if (err) {
1066 if (console.error) {
1067 console.error(err);
1068 }
1069 }
1070 else if (console[name]) {
1071 _arrayEach(args, function (x) {
1072 console[name](x);
1073 });
1074 }
1075 }
1076 })]));
1077 });
1078 }
1079 async.log = _console_fn('log');
1080 async.dir = _console_fn('dir');
1081 /*async.info = _console_fn('info');

Callers 1

async.jsFile · 0.85

Calls 2

_restParamFunction · 0.85
_arrayEachFunction · 0.85

Tested by

no test coverage detected