@apicart/js-utils
Version:
A small set of useful utilities for easier development
35 lines (27 loc) • 511 B
text/typescript
/* eslint-disable no-console */
class Console
{
public error(...data: any[]): this
{
if (typeof console.error !== 'undefined') {
console.error(...data);
}
return this;
}
public log(...data: any[]): this
{
if (typeof console.log !== 'undefined') {
console.log(...data);
}
return this;
}
public warn(...data: any[]): this
{
if (typeof console.warn !== 'undefined') {
console.warn(...data);
}
return this;
}
}
export default new Console();
/* eslint-enable no-console */