@scalecube/utils
Advanced tools
Comparing version 0.0.2-snapshot.1564392337.5 to 0.0.2-snapshot.1564563590.1
@@ -143,3 +143,3 @@ var assert = function (predicate, msg) { | ||
if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) { | ||
console.warn("Don't use this on webworkers, only on the main thread"); | ||
console.error("Don't use this on webworkers, only on the main thread"); | ||
} | ||
@@ -202,3 +202,4 @@ else { | ||
}; | ||
var saveToLogs = function (identifier, msg, extra, debug) { | ||
var saveToLogs = function (identifier, msg, extra, debug, type) { | ||
if (type === void 0) { type = 'log'; } | ||
if (!colorsMap[identifier]) { | ||
@@ -210,7 +211,7 @@ colorsMap[identifier] = getRandomColor(); | ||
var logColor = "color:" + colorsMap[identifier]; | ||
extra && console.log("%c******** address: " + identifier + "********", logColor); | ||
console.log(msg); | ||
extra && console[type]("%c******** address: " + identifier + "********", logColor); | ||
console[type](msg); | ||
extra && | ||
Object.keys(extra).forEach(function (key) { | ||
console.log(key + ": " + JSON.stringify(extra[key], null, 2)); | ||
console[type](key + ": " + JSON.stringify(extra[key], null, 2)); | ||
}); | ||
@@ -217,0 +218,0 @@ } |
export declare const saveToLogs: (identifier: string, msg: string, extra: { | ||
[key: string]: any; | ||
}, debug?: boolean | undefined) => void; | ||
}, debug?: boolean | undefined, type?: "log" | "warn") => void; |
@@ -147,3 +147,3 @@ 'use strict'; | ||
if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) { | ||
console.warn("Don't use this on webworkers, only on the main thread"); | ||
console.error("Don't use this on webworkers, only on the main thread"); | ||
} | ||
@@ -206,3 +206,4 @@ else { | ||
}; | ||
var saveToLogs = function (identifier, msg, extra, debug) { | ||
var saveToLogs = function (identifier, msg, extra, debug, type) { | ||
if (type === void 0) { type = 'log'; } | ||
if (!colorsMap[identifier]) { | ||
@@ -214,7 +215,7 @@ colorsMap[identifier] = getRandomColor(); | ||
var logColor = "color:" + colorsMap[identifier]; | ||
extra && console.log("%c******** address: " + identifier + "********", logColor); | ||
console.log(msg); | ||
extra && console[type]("%c******** address: " + identifier + "********", logColor); | ||
console[type](msg); | ||
extra && | ||
Object.keys(extra).forEach(function (key) { | ||
console.log(key + ": " + JSON.stringify(extra[key], null, 2)); | ||
console[type](key + ": " + JSON.stringify(extra[key], null, 2)); | ||
}); | ||
@@ -221,0 +222,0 @@ } |
export declare const saveToLogs: (identifier: string, msg: string, extra: { | ||
[key: string]: any; | ||
}, debug?: boolean | undefined) => void; | ||
}, debug?: boolean | undefined, type?: "log" | "warn") => void; |
{ | ||
"name": "@scalecube/utils", | ||
"version": "0.0.2-snapshot.1564392337.5+ecae863", | ||
"version": "0.0.2-snapshot.1564563590.1+12a37ca", | ||
"private": false, | ||
@@ -38,5 +38,5 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@scalecube/api": "^0.0.2-alpha.8" | ||
"@scalecube/api": "^0.0.2-alpha.9" | ||
}, | ||
"gitHead": "ecae863d396824245632a0addb2c087511b223fd" | ||
"gitHead": "12a37cac94326fff47b03060f1fc7905ad5a7bee" | ||
} |
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
35765
537