@razorpay/blade
Version:
The Design System that powers Razorpay
33 lines (31 loc) • 892 B
JavaScript
var PREFIX = '[Blade]:';
var throwBladeError = function throwBladeError(_ref) {
var message = _ref.message,
moduleName = _ref.moduleName;
if (false) {
var prefix = moduleName ? "[Blade: ".concat(moduleName, "]:") : PREFIX;
throw new Error("".concat(prefix, " ").concat(message));
}
};
var getCommonLogger = function getCommonLogger(type) {
switch (type) {
case 'error':
return console.error;
case 'warn':
return console.warn;
case 'log':
default:
return console.log;
}
};
var logger = function logger(_ref2) {
var message = _ref2.message,
moduleName = _ref2.moduleName,
type = _ref2.type;
if (false) {
var prefix = moduleName ? "[Blade: ".concat(moduleName, "]:") : PREFIX;
getCommonLogger(type)("".concat(prefix, " ").concat(message));
}
};
export { logger, throwBladeError };
//# sourceMappingURL=logger.js.map