Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
sDate = val.toString();
} else {
sDate = val.toISOString ? val.toISOString() : toISOString(val);
}
val = '[Date: ' + sDate + ']';
break;
case 'buffer':
var json = val.toJSON();
// Based on the toJSON result
json = json.data && json.type ? json.data : json;
val = '[Buffer: ' + jsonStringify(json, 2, depth + 1) + ']';
break;
default:
val = (val === '[Function]' || val === '[Circular]')
? val
: JSON.stringify(val); // string
}
return val;
}
sDate = val.toString();
} else {
sDate = val.toISOString ? val.toISOString() : toISOString(val);
}
val = '[Date: ' + sDate + ']';
break;
case 'buffer':
var json = val.toJSON();
// Based on the toJSON result
json = json.data && json.type ? json.data : json;
val = '[Buffer: ' + jsonStringify(json, 2, depth + 1) + ']';
break;
default:
val = (val === '[Function]' || val === '[Circular]')
? val
: JSON.stringify(val); // string
}
return val;
}
sDate = val.toString();
} else {
sDate = val.toISOString ? val.toISOString() : toISOString(val);
}
val = '[Date: ' + sDate + ']';
break;
case 'buffer':
var json = val.toJSON();
// Based on the toJSON result
json = json.data && json.type ? json.data : json;
val = '[Buffer: ' + jsonStringify(json, 2, depth + 1) + ']';
break;
default:
val = (val === '[Function]' || val === '[Circular]')
? val
: JSON.stringify(val); // string
}
return val;
}
sDate = val.toString();
} else {
sDate = val.toISOString ? val.toISOString() : toISOString(val);
}
val = '[Date: ' + sDate + ']';
break;
case 'buffer':
var json = val.toJSON();
// Based on the toJSON result
json = json.data && json.type ? json.data : json;
val = '[Buffer: ' + jsonStringify(json, 2, depth + 1) + ']';
break;
default:
val = (val === '[Function]' || val === '[Circular]')
? val
: JSON.stringify(val); // string
}
return val;
}
return;
integrations[key] = value;
}, providers);
// move all toplevel options to msg
// and the rest to context.
each(function(value, key) {
if (includes(key, toplevel)) {
ret[key] = opts[key];
} else {
context[key] = opts[key];
}
}, opts);
// generate and attach a messageId to msg
msg.messageId = 'ajs-' + md5(json.stringify(msg) + uuid());
// cleanup
delete msg.options;
ret.integrations = integrations;
ret.context = context;
ret = defaults(ret, msg);
debug('->', ret);
return ret;
function integration(name) {
return !!(
includes(name, list) ||
name.toLowerCase() === 'all' ||
includes(name.toLowerCase(), lower)
);
}
}).join('\n').substr(2);
} else {
str = '\n' + map(str.split('\n'), function(line) {
return ' ' + line;
}).join('\n');
}
}
} else {
str = ctx.stylize('[Circular]', 'special');
}
}
if (isUndefined(name)) {
if (array && key.match(/^\d+$/)) {
return str;
}
name = JSON.stringify('' + key);
if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
name = name.substr(1, name.length - 2);
name = ctx.stylize(name, 'name');
} else {
name = name.replace(/'/g, "\\'")
.replace(/\\"/g, '"')
.replace(/(^"|"$)/g, "'");
name = ctx.stylize(name, 'string');
}
}
return name + ': ' + str;
}
this.ir.once('finish', function(info, rtt) {
self.ir = null;
self.emit('message', JSON3.stringify([info, rtt]));
});
}
this.ir.once('finish', function(info, rtt) {
self.ir = null;
self.emit('message', JSON3.stringify([info, rtt]));
});
}
this.ir.once('finish', function(info, rtt) {
self.ir = null;
self.emit('message', JSON3.stringify([info, rtt]));
});
}
ir.once('finish', function(info, rtt) {
self.emit('message', JSON3.stringify([info, rtt]));
});
}