MCPcopy Index your code
hub / github.com/caolan/nodeunit / _console_fn

Function _console_fn

examples/browser/nodeunit.js:1074–1093  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

1072 };
1073
1074 var _console_fn = function (name) {
1075 return function (fn) {
1076 var args = Array.prototype.slice.call(arguments, 1);
1077 fn.apply(null, args.concat([function (err) {
1078 var args = Array.prototype.slice.call(arguments, 1);
1079 if (typeof console !== 'undefined') {
1080 if (err) {
1081 if (console.error) {
1082 console.error(err);
1083 }
1084 }
1085 else if (console[name]) {
1086 _forEach(args, function (x) {
1087 console[name](x);
1088 });
1089 }
1090 }
1091 }]));
1092 };
1093 };
1094 async.log = _console_fn('log');
1095 async.dir = _console_fn('dir');
1096 /*async.info = _console_fn('info');

Callers 1

nodeunit.jsFile · 0.70

Calls 1

_forEachFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…