Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function printf() { console.log(sprintf.apply(this, arguments)); }
}
if (sprintf_args.length === 0) {
shortmessage = '';
} else if (
options.skipPrintf ||
(sprintf_args.length === 1 && typeof sprintf_args[0] === 'string')
) {
assert.equal(
sprintf_args.length,
1,
'only one argument is allowed with options.skipPrintf'
);
shortmessage = sprintf_args[0];
} else {
shortmessage = sprintf.apply(null, sprintf_args);
}
return {
options: options,
shortmessage: shortmessage
};
}