trezor-link
Advanced tools
Comparing version 0.2.4 to 0.2.5
@@ -132,5 +132,6 @@ "use strict"; | ||
const debug = this.debug || name === `init` && arguments[0]; | ||
const objName = this.constructor.name; | ||
const argsArr = Array.prototype.slice.call(arguments); | ||
if (debug) { | ||
console.log(`[trezor-link] Calling ${ target.name }.${ name }(${ argsArr.map(f => JSON.stringify(f)).join(`, `) })`); | ||
console.log(`[trezor-link] Calling ${ objName }.${ name }(${ argsArr.map(f => JSON.stringify(f)).join(`, `) })`); | ||
} | ||
@@ -142,5 +143,5 @@ // assuming that the function is a promise | ||
if (res == null) { | ||
console.log(`[trezor-link] Done ${ target.name }.${ name }`); | ||
console.log(`[trezor-link] Done ${ objName }.${ name }`); | ||
} else { | ||
console.log(`[trezor-link] Done ${ target.name }.${ name }, result ${ JSON.stringify(res) }`); | ||
console.log(`[trezor-link] Done ${ objName }.${ name }, result ${ JSON.stringify(res) }`); | ||
} | ||
@@ -151,3 +152,3 @@ } | ||
if (debug) { | ||
console.error(`[trezor-link] Error in ${ target.name }.${ name }`, err); | ||
console.error(`[trezor-link] Error in ${ objName }.${ name }`, err); | ||
} | ||
@@ -154,0 +155,0 @@ throw err; |
@@ -323,3 +323,3 @@ 'use strict'; | ||
this._udevError = false; | ||
this.version = "0.2.4"; | ||
this.version = "0.2.5"; | ||
this.debug = false; | ||
@@ -326,0 +326,0 @@ } |
@@ -167,3 +167,3 @@ 'use strict'; | ||
this.infos = {}; | ||
this.version = "0.2.4"; | ||
this.version = "0.2.5"; | ||
this.debug = false; | ||
@@ -170,0 +170,0 @@ this.ports = []; |
@@ -176,3 +176,3 @@ 'use strict'; | ||
this._devices = {}; | ||
this.version = "0.2.4"; | ||
this.version = "0.2.5"; | ||
this.debug = false; | ||
@@ -179,0 +179,0 @@ } |
{ | ||
"name": "trezor-link", | ||
"version": "0.2.4", | ||
"version": "0.2.5", | ||
"description": "Trezor Link", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -7,5 +7,6 @@ /* @flow weak */ | ||
const debug = this.debug || (name === `init` && arguments[0]); | ||
const objName = this.constructor.name; | ||
const argsArr = Array.prototype.slice.call(arguments); | ||
if (debug) { | ||
console.log(`[trezor-link] Calling ${target.name}.${name}(${argsArr.map(f => JSON.stringify(f)).join(`, `)})`); | ||
console.log(`[trezor-link] Calling ${objName}.${name}(${argsArr.map(f => JSON.stringify(f)).join(`, `)})`); | ||
} | ||
@@ -17,5 +18,5 @@ // assuming that the function is a promise | ||
if (res == null) { | ||
console.log(`[trezor-link] Done ${target.name}.${name}`); | ||
console.log(`[trezor-link] Done ${objName}.${name}`); | ||
} else { | ||
console.log(`[trezor-link] Done ${target.name}.${name}, result ${JSON.stringify(res)}`); | ||
console.log(`[trezor-link] Done ${objName}.${name}, result ${JSON.stringify(res)}`); | ||
} | ||
@@ -26,3 +27,3 @@ } | ||
if (debug) { | ||
console.error(`[trezor-link] Error in ${target.name}.${name}`, err); | ||
console.error(`[trezor-link] Error in ${objName}.${name}`, err); | ||
} | ||
@@ -29,0 +30,0 @@ throw err; |
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
441708
9192