minor.
This commit is contained in:
parent
fbc8af9d94
commit
8efef35828
@ -15,11 +15,6 @@ var utils = require('./utils');
|
||||
var assert = utils.assert;
|
||||
var VerifyError = utils.VerifyError;
|
||||
|
||||
/**
|
||||
* @event Chain#block
|
||||
* @type {Block|MerkleBlock}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Represents a blockchain.
|
||||
* @exports Chain
|
||||
|
||||
@ -251,6 +251,8 @@ Environment.prototype.ensurePrefix = function ensurePrefix() {
|
||||
|
||||
/**
|
||||
* Output a debug message.
|
||||
* @param {Object|String} obj
|
||||
* @param {...String} args
|
||||
* @example
|
||||
* bcoin.debug('foo: %d', 10);
|
||||
*/
|
||||
|
||||
@ -1004,7 +1004,10 @@ utils._inspect = function _inspect(obj, color) {
|
||||
*/
|
||||
|
||||
utils.format = function format(args, color) {
|
||||
color = color ? process.stdout.isTTY : false;
|
||||
color = color
|
||||
? (process.stdout ? process.stdout.isTTY : true)
|
||||
: false;
|
||||
|
||||
return typeof args[0] === 'object'
|
||||
? utils._inspect(args[0], color) + '\n'
|
||||
: util.format.apply(util, args) + '\n';
|
||||
@ -1012,8 +1015,8 @@ utils.format = function format(args, color) {
|
||||
|
||||
/**
|
||||
* Write a message to stdout (console in browser).
|
||||
* @param {Object|String} str
|
||||
* @param {Object|String} arg1
|
||||
* @param {Object|String} obj
|
||||
* @param {...String} args
|
||||
*/
|
||||
|
||||
utils.print = function print() {
|
||||
@ -1035,7 +1038,7 @@ utils.print = function print() {
|
||||
/**
|
||||
* Shallow merge between multiple objects.
|
||||
* @param {Object} target
|
||||
* @param {Object} obj1
|
||||
* @param {...Object} args
|
||||
* @returns {Object} target
|
||||
*/
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user