该文章投稿至Nemo社区
Js、Css、Html 板块
复制链接
【NodeJS]Util.inspect实体属性输出
发布于
2016/06/17 00:12
1,973浏览
0回复
294字
var util = require('util');
function Person (){
this.name = 'Nemo';
this.toString = function (){
return this.name;
}
}
var obj = new Person ();
console.log(util.inspect(obj,true,2,true));
{{nearbyArticles.thumbsUp.thumbs ? '已赞(' + nearbyArticles.thumbsUp.count + ')' : '点赞(' + nearbyArticles.thumbsUp.count + ')'}}