Comparing version 2.3.0 to 2.4.0
@@ -5,8 +5,4 @@ "use strict"; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.timestamp = exports.colors = exports.symbols = exports.warn = exports.success = exports.error = exports.info = exports.time = exports.log = void 0; | ||
const picocolors_1 = __importDefault(require("picocolors")); | ||
exports.colors = picocolors_1.default; | ||
const time_stamp_1 = __importDefault(require("time-stamp")); | ||
exports.timestamp = time_stamp_1.default; | ||
function isUnicodeSupported() { | ||
@@ -41,3 +37,2 @@ if (process.platform !== 'win32') { | ||
})(); | ||
exports.symbols = symbols; | ||
function logFn(fn, args, prefix) { | ||
@@ -50,3 +45,2 @@ if (prefix) { | ||
const log = (...args) => logFn(console.log, args); | ||
exports.log = log; | ||
const time = (...args) => { | ||
@@ -56,10 +50,6 @@ const times = (0, time_stamp_1.default)('HH:mm:ss'); | ||
}; | ||
exports.time = time; | ||
const info = (...args) => logFn(console.info, args, symbols.info); | ||
exports.info = info; | ||
const error = (...args) => logFn(console.error, args, symbols.error); | ||
exports.error = error; | ||
const success = (...args) => logFn(console.log, args, symbols.success); | ||
exports.success = success; | ||
const warn = (...args) => logFn(console.warn, args, symbols.warn); | ||
exports.warn = warn; | ||
module.exports = { log, time, info, error, success, warn, symbols, colors: picocolors_1.default, timestamp: time_stamp_1.default }; |
{ | ||
"name": "diy-log", | ||
"version": "2.3.0", | ||
"version": "2.4.0", | ||
"description": "Log things, prefixed with a symbols or timestamp.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
import colors from 'picocolors' | ||
import timestamp from 'time-stamp' | ||
declare const symbols: { | ||
declare const Symbols: { | ||
info: string | ||
@@ -22,3 +22,3 @@ success: string | ||
timestamp: typeof timestamp | ||
symbols: typeof symbols | ||
symbols: typeof Symbols | ||
} | ||
@@ -25,0 +25,0 @@ |
4516
73