analogger 1.4.0 → 1.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.nycrc ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "lines": 100,
3
+ "statements": 100,
4
+ "functions": 100,
5
+ "branches": 50,
6
+ "reporter": [
7
+ "json",
8
+ "text-summary"
9
+ ],
10
+ "exclude": [
11
+ "coverage/**",
12
+ "docs/**",
13
+ "test{,s}/**",
14
+ "test{,-*}.{js,cjs,mjs,ts}",
15
+ "lib/browser/**",
16
+ "package-scripts.js",
17
+ "scripts/**"
18
+ ],
19
+ "check-coverage": true
20
+ }
package/CHANGELOG.md CHANGED
@@ -1 +1,13 @@
1
+ ## [1.5.1](https://github.com/thimpat/analogger/compare/v1.5.0...v1.5.1) (2022-02-11)
2
+
3
+ # [1.5.0](https://github.com/thimpat/analogger/compare/v1.4.1...v1.5.0) (2022-02-11)
4
+
5
+ ## [1.4.1](https://github.com/thimpat/analogger/compare/v1.4.0...v1.4.1) (2022-02-09)
6
+
7
+ # [1.4.0](https://github.com/thimpat/analogger/compare/v1.3.2...v1.4.0) (2022-02-09)
8
+
9
+ ## [1.3.2](https://github.com/thimpat/analogger/compare/v1.3.1...v1.3.2) (2022-02-09)
10
+
11
+ ## [1.3.1](https://github.com/thimpat/analogger/compare/v1.3.0...v1.3.1) (2022-02-09)
12
+
1
13
  # [1.3.0](https://github.com/thimpat/analogger/compare/v1.2.0...v1.3.0) (2022-02-08)
package/README.md CHANGED
@@ -1,6 +1,11 @@
1
1
 
2
- ![Test workflow](https://github.com/thimpat/analogger/actions/workflows/test.yml/badge.svg)
3
- ![Version workflow](https://github.com/thimpat/analogger/actions/workflows/versioning.yml/badge.svg)
2
+ [![Test workflow](https://github.com/thimpat/analogger/actions/workflows/test.yml/badge.svg)](https://github.com/thimpat/analogger/actions/workflows/test.yml)
3
+ [![nycrc Coverage](https://img.shields.io/nycrc/thimpat/analogger?preferredThreshold=lines)](https://github.com/thimpat/analogger/blob/main/README.md)
4
+ [![Version workflow](https://github.com/thimpat/analogger/actions/workflows/versioning.yml/badge.svg)](https://github.com/thimpat/analogger/actions/workflows/versioning.yml)
5
+ [![npm version](https://badge.fury.io/js/analogger.svg)](https://www.npmjs.com/package/analogger)
6
+ <img alt="semantic-release" src="https://img.shields.io/badge/semantic--release-19.0.2-e10079?logo=semantic-release">
7
+
8
+ ---
4
9
 
5
10
  Analogger is a very simple logger for both Node and the Browser.
6
11
  It is a library using both CJS and ESM.
@@ -36,10 +41,14 @@ import {anaLogger} from "analogger"
36
41
 
37
42
  ### Preview
38
43
 
44
+ #### Terminal
39
45
  ![img_1.png](https://github.com/thimpat/analogger/blob/main/docs/images/img_3.png)
40
46
 
47
+ #### Inspector
41
48
  ![img.png](https://github.com/thimpat/analogger/blob/main/docs/images/img_2.png)
42
49
 
50
+ #### DOM
51
+ ![img.png](https://github.com/thimpat/analogger/blob/main/docs/images/img_4.png)
43
52
  <br/>
44
53
 
45
54
  ## API
@@ -68,7 +77,26 @@ Display the browser native message box if run from it; otherwise, it displays th
68
77
 
69
78
  <br/>
70
79
 
71
- ### overrideConsole() | setOptions()
80
+ ### setOptions()
81
+
82
+
83
+ | **Options** | **default** | **Description** |
84
+ |--------------------|-------------|------------------------------------------------------------------------------------|
85
+ | silent | false | _No log will be displayed (only errors)_ |
86
+ | hideError | false | _Hide errors from console_ |
87
+ | hideHookMessage | false | _Hide the automatic message shown when some native console methods are overridden_ |
88
+ | showPassingTests | true | _Show Live test results_ |
89
+ | logToDom | undefined | _display log in a DOM container_ |
90
+
91
+
92
+ ```javascript
93
+ // No hook alert message + Log messages in the div #analogger
94
+ anaLogger.setOptions({hideHookMessage: true, logToDom: "#analogger"})
95
+ ```
96
+
97
+ <br/>
98
+
99
+ ### overrideConsole()
72
100
 
73
101
  ```javascript
74
102
  anaLogger.setOptions({silent: true, hideError: false})
@@ -149,10 +177,10 @@ const LOG_TARGETS = {ALL: "ALL", DEV1: "TOM", DEV2: "TIM", USER: "USER"};
149
177
  anaLogger.setContexts(LOG_CONTEXTS);
150
178
  anaLogger.setActiveTarget(LOG_TARGETS.DEV1); // <- You are DEV1
151
179
 
152
- console.log({target: LOG_TARGETS.DEV1}, `Testing log 1`); // You will see this
153
- console.log({target: LOG_TARGETS.DEV2}, `Testing log 2`); // You will not see this
154
- console.log({context: LOG_CONTEXTS.STANDARD}, `Testing log 3`); // You will see this
155
- console.log(`Testing log 4`); // You will see this. No context = LOG_CONTEXTS.ALL
180
+ anaLogger.log({target: LOG_TARGETS.DEV1}, `Testing log 1`); // You will see this
181
+ anaLogger.log({target: LOG_TARGETS.DEV2}, `Testing log 2`); // You will not see this
182
+ anaLogger.log({context: LOG_CONTEXTS.STANDARD}, `Testing log 3`); // You will see this
183
+ anaLogger.log(`Testing log 4`); // You will see this. No context = LOG_CONTEXTS.ALL
156
184
 
157
185
 
158
186
  anaLogger.log(LOG_CONTEXTS.C1, `Test Log example C1`); // You will see this
package/ci.md CHANGED
Binary file
@@ -1,2 +1,2 @@
1
1
  "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var require$$0=require("chalk-cjs"),require$$1=require("color-convert-cjs"),require$$2=require("rgb-hex-cjs");function _interopDefaultLegacy(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var require$$0__default=_interopDefaultLegacy(require$$0),require$$1__default=_interopDefaultLegacy(require$$1),require$$2__default=_interopDefaultLegacy(require$$2),anaLogger={},constants$1={};const constants={COLOR_TABLE:["#d2466e","#FFA07A","#FF7F50","#FF6347","#FFE4B5","#ADFF2F","#808000","#40E0D0","#1E90FF","#EE82EE","#708090","#DEB887","#FE642E","#210B61","#088A4B","#5E610B","#FA8258","#088A68","#B40431"],SYSTEM:{BROWSER:"BROWSER",NODE:"NODE"}},chalk=(constants$1.COLOR_TABLE=constants.COLOR_TABLE,constants$1.SYSTEM=constants.SYSTEM,require$$0__default.default),colorConvert=require$$1__default.default,rgbHex=require$$2__default.default,{COLOR_TABLE,SYSTEM}=constants$1,EOL=`
2
- `;class AnaLogger{system="";logIndex=0;contexts=[];targets={};activeTarget=null;indexColor=0;format="";keepLog=!1;logHistory=[];options={hideHookMessage:!1};static ALIGN={LEFT:"LEFT",RIGHT:"RIGHT"};static ENVIRONMENT_TYPE={BROWSER:"BROWSER",NODE:"NODE",OTHER:"OTHER"};originalFormatFunction;constructor(){this.system="object"==typeof process?SYSTEM.NODE:SYSTEM.BROWSER,this.format=this.onBuildLog.bind(this),this.originalFormatFunction=this.format,this.errorTargetHandler=this.onError.bind(this),this.errorUserTargetHandler=this.onErrorForUserTarget.bind(this),this.setOptions(this.options),this.realConsoleLog=console.log,this.realConsoleInfo=console.info,this.realConsoleWarn=console.warn,this.realConsoleError=console.error,this.ALIGN=AnaLogger.ALIGN,this.ENVIRONMENT_TYPE=AnaLogger.ENVIRONMENT_TYPE}keepLogHistory(){this.keepLog=!0}releaseLogHistory(){this.keepLog=!1}resetLogHistory(){this.logHistory=[]}getLogHistory(e=!0,t=EOL){const o=JSON.parse(JSON.stringify(this.logHistory.slice(0)));return e?o.join(t):o}isNode(){return this.system===SYSTEM.NODE}isBrowser(){return!this.isNode()}setOptions({contextLenMax:e=10,idLenMax:t=5,lidLenMax:o=5,symbolLenMax:r=2,messageLenMax:s=60,hideLog:i=!1,hideError:n=!1,hideHookMessage:a=!1,showPassingTests:l=!0,silent:g=!1}={}){this.options.contextLenMax=e,this.options.idLenMax=t,this.options.lidLenMax=o,this.options.messageLenMax=s,this.options.symbolLenMax=r,this.options.hideLog=!!i,this.options.hideError=!!n,this.options.hideHookMessage=!!a,this.options.showPassingTests=!!l,g&&(this.options.hideLog=!0,this.options.hideHookMessage=!0,this.options.silent=!0)}getOptions(){return this.options}truncateMessage(e="",{fit:t=0,align:o=AnaLogger.ALIGN.LEFT}){return e=""+e,t&&e.length>=t+2&&(e=e.substring(0,t-3)+"..."),e=o===AnaLogger.ALIGN.LEFT?e.padEnd(t+1," "):e.padStart(t+1," ")}onBuildLog({contextName:e,message:t="",lid:o="",symbol:r=""}={}){const s=new Date;var i=("0"+s.getHours()).slice(-2)+":"+("0"+s.getMinutes()).slice(-2)+":"+("0"+s.getSeconds()).slice(-2),i=this.truncateMessage(i,{fit:7});return e=this.truncateMessage(e,{fit:this.options.contextLenMax,align:AnaLogger.ALIGN.RIGHT}),o=this.truncateMessage(o,{fit:this.options.lidLenMax}),t=this.truncateMessage(t,{fit:this.options.messageLenMax}),`[${i}] ${e}: (${o}) ${r=this.truncateMessage(r,{fit:this.options.symbolLenMax})} `+t}onErrorForUserTarget(e,...t){this.errorUserTargetHandler(e,...t)}onError(e,...t){e.target===this.targets.USER&&this.onErrorForUserTarget(e,...t)}onDisplayLog(...e){this.log(...e)}onDisplayError(...e){this.error(...e)}setLogFormat(e){if("function"!=typeof e)return console.error("Invalid parameter for setFormat. It is expecting a function or method."),!1;this.format=e.bind(this)}resetLogFormatter(){this.format=this.originalFormatFunction}setErrorHandler(e){this.errorTargetHandler=e.bind(this)}setErrorHandlerForUserTarget(e){this.errorUserTargetHandler=e.bind(this)}isContextValid(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e&&(e.hasOwnProperty("contextName")&&e.hasOwnProperty("target"))}generateDefaultContext(){const e={name:"DEFAULT",contextName:"DEFAULT",target:"ALL",symbol:"⚡"};return e.id=this.logIndex++,e.color=COLOR_TABLE[1],e}generateNewContext(){const e=this.generateDefaultContext();return e.color=COLOR_TABLE[this.indexColor++%(COLOR_TABLE.length-3)+2],e.symbol="",e}generateErrorContext(){const e=this.generateDefaultContext();return e.color=COLOR_TABLE[0],e.symbol="v",e.error=!0,e}#allegeProperties(e){let t=e;e=this.generateNewContext();return t=Object.assign({},e,t),-1<t.color.toLowerCase().indexOf("rgb")?t.color="#"+rgbHex(t.color):-1===t.color.indexOf("#")&&colorConvert&&(t.color="#"+colorConvert.keyword.hex(t.color)),t}setContexts(o){const e=Object.keys(o);o.DEFAULT=this.contexts.DEFAULT=this.generateDefaultContext(),o.ERROR=this.contexts.ERROR=this.generateErrorContext(),e.forEach(e=>{const t=o[e]||{};t.contextName=e,t.name=e,this.contexts[e]=this.#allegeProperties(t),o[e]=this.contexts[e]})}setTargets(e={}){this.targets=Object.assign({},e,{ALL:"ALL",USER:"USER"})}setActiveTarget(e){this.activeTarget=e}isTargetAllowed(e){return!e||!this.activeTarget||(e===this.targets.ALL||this.activeTarget===e)}processOutput(o={}){try{if(!this.isTargetAllowed(o.target))return;let e=Array.prototype.slice.call(arguments);e.shift();var r=e.join(" | ");let t="";var s=this.format({...o,message:r});if(t=this.isBrowser()?(o.environnment=AnaLogger.ENVIRONMENT_TYPE.BROWSER,"%c"+s):(o.environnment=AnaLogger.ENVIRONMENT_TYPE.NODE,chalk.hex(o.color)(s)),this.keepLog&&this.logHistory.push(t),this.options.hideLog)return;this.isBrowser()?this.realConsoleLog(t,"color: "+o.color):this.realConsoleLog(t),this.errorTargetHandler(o,e)}catch(e){console.error("AnaLogger:",e.message)}}isExtendedOptionsPassed(e){return"object"==typeof e&&(e.hasOwnProperty("context")||e.hasOwnProperty("target"))}convertToContext(e,t){t=t||this.generateDefaultContext();let o=e=e||t;if(e.context&&"object"==typeof e.context){const r=Object.assign({},e);delete r.context,o=Object.assign({},e.context,r)}return o=Object.assign({},t,o),delete o.context,o}log(e,...t){if(!this.isExtendedOptionsPassed(e))return o=this.generateDefaultContext(),void this.processOutput.apply(this,[o,e,...t]);var o=this.convertToContext(e);this.processOutput.apply(this,[o,...t])}error(e){var t;this.options.hideError||(t=this.generateErrorContext(),e=this.convertToContext(e,t),t=Array.prototype.slice.call(arguments),this.log(e,...t))}overrideError(){this.options.hideHookMessage||this.realConsoleLog("AnaLogger: Hook placed on console.error"),console.error=this.onDisplayError.bind(this)}overrideConsole({log:e=!0,info:t=!0,warn:o=!0,error:r=!1}={}){this.options.hideHookMessage||this.realConsoleLog("AnaLogger: Hook placed on console.log"),e&&(console.log=this.onDisplayLog.bind(this)),t&&(console.info=this.onDisplayLog.bind(this)),o&&(console.warn=this.onDisplayLog.bind(this)),r&&this.overrideError()}removeOverrideError(){console.warn=this.realConsoleError}removeOverride({log:e=!0,info:t=!0,warn:o=!0,error:r=!1}={}){e&&(console.log=this.realConsoleLog),t&&(console.info=this.realConsoleInfo),o&&(console.warn=this.realConsoleWarn),r&&this.removeOverrideError()}info(...e){return this.log(...e)}warn(...e){return this.log(...e)}alert(...e){if(this.isNode())return this.log(...e);e=e.join(" | ");alert(e)}assert(e,t=!0,...o){try{return"function"==typeof e?e(...o)!==t?(this.error("Asset failed"),!1):(this.options.showPassingTests&&this.log("SUCCESS: Assert passed"),!0):e!==t?(this.error("Assert failed"),!1):(this.options.showPassingTests&&this.log("SUCCESS: Assert passed"),!0)}catch(e){this.error("Unexpected error in assert")}return!1}}var anaLogger_1=anaLogger.anaLogger=new AnaLogger;exports.anaLogger=anaLogger_1,exports.default=anaLogger;
2
+ `;class AnaLogger{system="";logIndex=0;contexts=[];targets={};activeTarget=null;indexColor=0;format="";keepLog=!1;logHistory=[];$containers=null;options={hideHookMessage:!1};static ALIGN={LEFT:"LEFT",RIGHT:"RIGHT"};static ENVIRONMENT_TYPE={BROWSER:"BROWSER",NODE:"NODE",OTHER:"OTHER"};originalFormatFunction;constructor(){this.system="object"==typeof process?SYSTEM.NODE:SYSTEM.BROWSER,this.format=this.onBuildLog.bind(this),this.originalFormatFunction=this.format,this.errorTargetHandler=this.onError.bind(this),this.errorUserTargetHandler=this.onErrorForUserTarget.bind(this),this.setOptions(this.options),this.realConsoleLog=console.log,this.realConsoleInfo=console.info,this.realConsoleWarn=console.warn,this.realConsoleError=console.error,this.ALIGN=AnaLogger.ALIGN,this.ENVIRONMENT_TYPE=AnaLogger.ENVIRONMENT_TYPE}keepLogHistory(){this.keepLog=!0}releaseLogHistory(){this.keepLog=!1}resetLogHistory(){this.logHistory=[]}getLogHistory(e=!0,t=EOL){const o=JSON.parse(JSON.stringify(this.logHistory.slice(0)));return e?o.join(t):o}isNode(){return this.system===SYSTEM.NODE}isBrowser(){return!this.isNode()}setOptions({contextLenMax:e=10,idLenMax:t=5,lidLenMax:o=5,symbolLenMax:r=2,messageLenMax:s=60,hideLog:n=!1,hideError:i=!1,hideHookMessage:a=!1,showPassingTests:l=!0,logToDom:g=void 0,silent:h=!1}={}){this.options.contextLenMax=e,this.options.idLenMax=t,this.options.lidLenMax=o,this.options.messageLenMax=s,this.options.symbolLenMax=r,this.options.hideLog=!!n,this.options.hideError=!!i,this.options.hideHookMessage=!!a,this.options.showPassingTests=!!l,void 0!==g&&(this.options.logToDom=g||"#analogger"),h&&(this.options.hideLog=!0,this.options.hideHookMessage=!0,this.options.silent=!0)}getOptions(){return this.options}truncateMessage(e="",{fit:t=0,align:o=AnaLogger.ALIGN.LEFT}){return e=""+e,t&&e.length>=t+2&&(e=e.substring(0,t-3)+"..."),e=o===AnaLogger.ALIGN.LEFT?e.padEnd(t+1," "):e.padStart(t+1," ")}onBuildLog({contextName:e,message:t="",lid:o="",symbol:r=""}={}){const s=new Date;var n=("0"+s.getHours()).slice(-2)+":"+("0"+s.getMinutes()).slice(-2)+":"+("0"+s.getSeconds()).slice(-2),n=this.truncateMessage(n,{fit:7});return e=this.truncateMessage(e,{fit:this.options.contextLenMax,align:AnaLogger.ALIGN.RIGHT}),o=this.truncateMessage(o,{fit:this.options.lidLenMax}),t=this.truncateMessage(t,{fit:this.options.messageLenMax}),`[${n}] ${e}: (${o}) ${r=this.truncateMessage(r,{fit:this.options.symbolLenMax})} `+t}onErrorForUserTarget(e,...t){this.errorUserTargetHandler(e,...t)}onError(e,...t){e.target===this.targets.USER&&this.onErrorForUserTarget(e,...t)}onDisplayLog(...e){this.log(...e)}onDisplayError(...e){this.error(...e)}setLogFormat(e){if("function"!=typeof e)return console.error("Invalid parameter for setFormat. It is expecting a function or method."),!1;this.format=e.bind(this)}resetLogFormatter(){this.format=this.originalFormatFunction}setErrorHandler(e){this.errorTargetHandler=e.bind(this)}setErrorHandlerForUserTarget(e){this.errorUserTargetHandler=e.bind(this)}isContextValid(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e&&(e.hasOwnProperty("contextName")&&e.hasOwnProperty("target"))}generateDefaultContext(){const e={name:"DEFAULT",contextName:"DEFAULT",target:"ALL",symbol:"⚡"};return e.id=this.logIndex++,e.color=COLOR_TABLE[1],e}generateNewContext(){const e=this.generateDefaultContext();return e.color=COLOR_TABLE[this.indexColor++%(COLOR_TABLE.length-3)+2],e.symbol="",e}generateErrorContext(){const e=this.generateDefaultContext();return e.color=COLOR_TABLE[0],e.symbol="v",e.error=!0,e}#allegeProperties(e){let t=e;e=this.generateNewContext();return t=Object.assign({},e,t),-1<t.color.toLowerCase().indexOf("rgb")?t.color="#"+rgbHex(t.color):-1===t.color.indexOf("#")&&colorConvert&&(t.color="#"+colorConvert.keyword.hex(t.color)),t}setContexts(o){const e=Object.keys(o);o.DEFAULT=this.contexts.DEFAULT=this.generateDefaultContext(),o.ERROR=this.contexts.ERROR=this.generateErrorContext(),e.forEach(e=>{const t=o[e]||{};t.contextName=e,t.name=e,this.contexts[e]=this.#allegeProperties(t),o[e]=this.contexts[e]})}setTargets(e={}){this.targets=Object.assign({},e,{ALL:"ALL",USER:"USER"})}setActiveTarget(e){this.activeTarget=e}isTargetAllowed(e){return!e||!this.activeTarget||(e===this.targets.ALL||this.activeTarget===e)}writeLogToDom(o){this.$containers=this.$containers||document.querySelectorAll(this.options.logToDom);for(let t=0;t<this.$containers.length;++t){const r=this.$containers[t];let e=r.querySelector(".analogger-view");e||(e=document.createElement("div"),e.classList.add("analogger-view"),r.append(e));const s=document.createElement("div"),n=(s.classList.add("to-esm-line"),s.textContent=o,document.createElement("span"));n.classList.add("to-esm-row"),s.append(n),e.append(s)}}processOutput(o={}){try{if(!this.isTargetAllowed(o.target))return;let e=Array.prototype.slice.call(arguments);e.shift();var r=e.join(" | ");let t="";var s=this.format({...o,message:r});if(t=this.isBrowser()?(o.environnment=AnaLogger.ENVIRONMENT_TYPE.BROWSER,this.options.logToDom&&this.writeLogToDom(s),"%c"+s):(o.environnment=AnaLogger.ENVIRONMENT_TYPE.NODE,chalk.hex(o.color)(s)),this.keepLog&&this.logHistory.push(t),this.options.hideLog)return;this.isBrowser()?this.realConsoleLog(t,"color: "+o.color):this.realConsoleLog(t),this.errorTargetHandler(o,e)}catch(e){console.error("AnaLogger:",e.message)}}isExtendedOptionsPassed(e){return"object"==typeof e&&(e.hasOwnProperty("context")||e.hasOwnProperty("target"))}convertToContext(e,t){t=t||this.generateDefaultContext();let o=e=e||t;if(e.context&&"object"==typeof e.context){const r=Object.assign({},e);delete r.context,o=Object.assign({},e.context,r)}return o=Object.assign({},t,o),delete o.context,o}log(e,...t){if(!this.isExtendedOptionsPassed(e))return o=this.generateDefaultContext(),void this.processOutput.apply(this,[o,e,...t]);var o=this.convertToContext(e);this.processOutput.apply(this,[o,...t])}error(e){var t;this.options.hideError||(t=this.generateErrorContext(),e=this.convertToContext(e,t),t=Array.prototype.slice.call(arguments),this.log(e,...t))}overrideError(){this.options.hideHookMessage||this.realConsoleLog("AnaLogger: Hook placed on console.error"),console.error=this.onDisplayError.bind(this)}overrideConsole({log:e=!0,info:t=!0,warn:o=!0,error:r=!1}={}){this.options.hideHookMessage||this.realConsoleLog("AnaLogger: Hook placed on console.log"),e&&(console.log=this.onDisplayLog.bind(this)),t&&(console.info=this.onDisplayLog.bind(this)),o&&(console.warn=this.onDisplayLog.bind(this)),r&&this.overrideError()}removeOverrideError(){console.warn=this.realConsoleError}removeOverride({log:e=!0,info:t=!0,warn:o=!0,error:r=!1}={}){e&&(console.log=this.realConsoleLog),t&&(console.info=this.realConsoleInfo),o&&(console.warn=this.realConsoleWarn),r&&this.removeOverrideError()}info(...e){return this.log(...e)}warn(...e){return this.log(...e)}alert(...e){if(this.isNode())return this.log(...e);e=e.join(" | ");alert(e)}assert(e,t=!0,...o){try{return"function"==typeof e?e(...o)!==t?(this.error("Asset failed"),!1):(this.options.showPassingTests&&this.log("SUCCESS: Assert passed"),!0):e!==t?(this.error("Assert failed"),!1):(this.options.showPassingTests&&this.log("SUCCESS: Assert passed"),!0)}catch(e){this.error("Unexpected error in assert")}return!1}}var anaLogger_1=anaLogger.anaLogger=new AnaLogger;exports.anaLogger=anaLogger_1,exports.default=anaLogger;