MCPcopy Index your code
hub / github.com/dresende/node-orm2 / buildMethod

Function buildMethod

test/logging.js:6–13  ·  view source on GitHub ↗
(stream, prefix, color)

Source from the content-addressed store, hash-verified

4exports.error = buildMethod(process.stderr, "[!]", 31);
5
6function buildMethod(stream, prefix, color) {
7 return function () {
8 var params = Array.prototype.slice.apply(arguments);
9 var text = params.shift();
10
11 return printTo(stream, prefix + " ", color, text, params);
12 };
13}
14
15function printTo(stream, prefix, color, text, params) {
16 params.unshift(text);

Callers 1

logging.jsFile · 0.85

Calls 1

printToFunction · 0.85

Tested by

no test coverage detected