@naturalcycles/js-lib
Advanced tools
Comparing version 4.10.0 to 4.10.1
@@ -0,1 +1,8 @@ | ||
## [4.10.1](https://github.com/NaturalCycles/js-lib/compare/v4.10.0...v4.10.1) (2019-05-08) | ||
### Bug Fixes | ||
* [@log](https://github.com/log)Millis default to noLogStart ([d902d32](https://github.com/NaturalCycles/js-lib/commit/d902d32)) | ||
# [4.10.0](https://github.com/NaturalCycles/js-lib/compare/v4.9.0...v4.10.0) (2019-05-08) | ||
@@ -2,0 +9,0 @@ |
@@ -22,3 +22,3 @@ import { anyToErrorMessage, resultToString, SimpleMovingAverage } from '..'; | ||
const methodSignature = [target.constructor.name, key].filter(Boolean).join('.'); | ||
const { avg, noLogArgs, noLogStart, logResult } = opt; | ||
const { avg, noLogArgs, logStart, logResult } = opt; | ||
let { logResultFn } = opt; | ||
@@ -32,3 +32,3 @@ if (logResult) | ||
const callSignature = `${methodSignature}(${argsStr}) #${++count}`; | ||
if (!noLogStart) | ||
if (logStart) | ||
console.log(`>> ${callSignature}`); | ||
@@ -35,0 +35,0 @@ const ctx = this; |
@@ -12,5 +12,8 @@ declare type LogResultFn = (r: any) => string; | ||
/** | ||
* Skip logging start message (>> ...) | ||
* Also log on method start. | ||
* Example: | ||
* | ||
* >> syncMethodSuccess() | ||
*/ | ||
noLogStart?: boolean; | ||
logStart?: boolean; | ||
/** | ||
@@ -17,0 +20,0 @@ * Log method result as is (stringified). |
@@ -24,3 +24,3 @@ "use strict"; | ||
const methodSignature = [target.constructor.name, key].filter(Boolean).join('.'); | ||
const { avg, noLogArgs, noLogStart, logResult } = opt; | ||
const { avg, noLogArgs, logStart, logResult } = opt; | ||
let { logResultFn } = opt; | ||
@@ -34,3 +34,3 @@ if (logResult) | ||
const callSignature = `${methodSignature}(${argsStr}) #${++count}`; | ||
if (!noLogStart) | ||
if (logStart) | ||
console.log(`>> ${callSignature}`); | ||
@@ -37,0 +37,0 @@ const ctx = this; |
{ | ||
"name": "@naturalcycles/js-lib", | ||
"version": "4.10.0", | ||
"version": "4.10.1", | ||
"scripts": { | ||
@@ -5,0 +5,0 @@ "build": "del ./dist && tsc", |
@@ -17,5 +17,8 @@ import { anyToErrorMessage, resultToString, SimpleMovingAverage } from '..' | ||
/** | ||
* Skip logging start message (>> ...) | ||
* Also log on method start. | ||
* Example: | ||
* | ||
* >> syncMethodSuccess() | ||
*/ | ||
noLogStart?: boolean | ||
logStart?: boolean | ||
@@ -64,3 +67,3 @@ /** | ||
const { avg, noLogArgs, noLogStart, logResult } = opt | ||
const { avg, noLogArgs, logStart, logResult } = opt | ||
let { logResultFn } = opt | ||
@@ -76,3 +79,3 @@ if (logResult) logResultFn = r => resultToString(r) | ||
const callSignature = `${methodSignature}(${argsStr}) #${++count}` | ||
if (!noLogStart) console.log(`>> ${callSignature}`) | ||
if (logStart) console.log(`>> ${callSignature}`) | ||
@@ -79,0 +82,0 @@ const ctx = this |
Sorry, the diff of this file is not supported yet
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
161770
3069