@pipeletteio/debug
Advanced tools
Comparing version 0.1.0 to 0.2.0
{ | ||
"name": "@pipeletteio/debug", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "A simple debug module", | ||
@@ -5,0 +5,0 @@ "private": false, |
@@ -41,2 +41,3 @@ <h1 align="center"> | ||
dedicatedDebug.done('done'); | ||
dedicatedDebug.note('note'); | ||
@@ -46,3 +47,3 @@ setTimeout(() => { | ||
debug.invalid('invalid'); | ||
dedicatedDebug.done('fail'); | ||
dedicatedDebug.fail('fail'); | ||
}, 500); | ||
@@ -54,5 +55,6 @@ | ||
// [myDedicatedDebugName] done +2ms | ||
// ✔ valid +502ms | ||
// [myDedicatedDebugName] note +1ms | ||
// ✔ valid +503ms | ||
// ✗ invalid +1ms | ||
// [myDedicatedDebugName] fail +503ms | ||
// [myDedicatedDebugName] fail +504ms | ||
``` | ||
@@ -84,2 +86,12 @@ | ||
#### Debug.prototype.note | ||
Write a formatted message to stdout (done alias). | ||
| argument | type | details | | ||
|---------------------------|------------|---------------| | ||
| arg | `string` | The message. | | ||
Return `void`. | ||
#### Debug.prototype.invalid | ||
@@ -86,0 +98,0 @@ |
@@ -41,3 +41,3 @@ /// <reference types="node" /> | ||
/** Replace methods by nop function. (nop function is a function that do nothing.) */ | ||
protected _disableLogMethods(): void; | ||
protected _disableLogMethods(): Debug; | ||
/** Get the "MUST DEBUG" state. */ | ||
@@ -44,0 +44,0 @@ protected _isDebugNeeded(): boolean; |
@@ -21,2 +21,3 @@ "use strict"; | ||
this._registerLogMethod('done', this.log); | ||
this._registerLogMethod('note', this.log); | ||
this._registerLogMethod('invalid', this.error, '\u001b[31m✗\u001b[0m'); | ||
@@ -23,0 +24,0 @@ this._registerLogMethod('valid', this.log, '\u001b[32m✔\u001b[0m'); |
@@ -53,2 +53,3 @@ import { Console } from 'console'; | ||
this._registerLogMethod('done', this.log); | ||
this._registerLogMethod('note', this.log); | ||
this._registerLogMethod('invalid', this.error, '\u001b[31m✗\u001b[0m'); | ||
@@ -86,3 +87,3 @@ this._registerLogMethod('valid', this.log, '\u001b[32m✔\u001b[0m'); | ||
/** Replace methods by nop function. (nop function is a function that do nothing.) */ | ||
protected _disableLogMethods (): void { | ||
protected _disableLogMethods (): Debug { | ||
const debugDescriptors = Object.entries(Object.getOwnPropertyDescriptors(this)); | ||
@@ -89,0 +90,0 @@ return Object.defineProperties(this, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25580
243
161