beautiful-log
Advanced tools
Comparing version 1.1.4 to 1.2.0
@@ -59,2 +59,8 @@ var log = require("./index"); | ||
log.line(); | ||
// Prints an empty line. | ||
log.line(2); | ||
// Prints many empty lines. | ||
log.indent(); | ||
@@ -61,0 +67,0 @@ log.log("This text is indented one level."); |
@@ -12,4 +12,4 @@ export declare function verbose(...args: any[]): void; | ||
export declare function logf(format: string, ...args: any[]): void; | ||
export declare function line(): void; | ||
export declare function line(count?: number): void; | ||
export declare function addFormat(name: string, format: string): void; | ||
export declare function addColor(name: string, color: string): void; |
@@ -117,4 +117,9 @@ "use strict"; | ||
exports.logf = logf; | ||
function line() { | ||
console.log(); | ||
function line(count) { | ||
if (count === undefined) { | ||
count = 1; | ||
} | ||
for (let i = 0; i < count; i++) { | ||
console.log(); | ||
} | ||
} | ||
@@ -121,0 +126,0 @@ exports.line = line; |
10
index.ts
@@ -137,4 +137,10 @@ "use strict"; | ||
export function line(): void { | ||
console.log(); | ||
export function line(count?: number): void { | ||
if (count === undefined) { | ||
count = 1; | ||
} | ||
for (let i = 0; i < count; i++) { | ||
console.log(); | ||
} | ||
} | ||
@@ -141,0 +147,0 @@ |
{ | ||
"name": "beautiful-log", | ||
"version": "1.1.4", | ||
"version": "1.2.0", | ||
"description": "Because logging should be beautiful.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -73,2 +73,8 @@ # beautiful-log | ||
log.line(); | ||
// Prints an empty line. | ||
log.line(2); | ||
// Prints many empty lines. | ||
log.indent(); | ||
@@ -75,0 +81,0 @@ log.log("This text is indented one level."); |
@@ -81,3 +81,3 @@ "use strict"; | ||
log.info("Nothing else should be printed."); | ||
log.line(); | ||
log.line(3); | ||
log.log("Test 1. Invalid format string"); | ||
@@ -84,0 +84,0 @@ try { |
@@ -117,3 +117,3 @@ "use strict"; | ||
log.line(); | ||
log.line(3); | ||
log.log("Test 1. Invalid format string"); | ||
@@ -120,0 +120,0 @@ |
788169
17653
86