2012-07-30から1日間の記事一覧
node.js でプロパティを増やしたい場合はこうする。node.js っていうかjavascriptかな。 var Hoge = function(bool) { this.hoge = bool ? true : false; }; Hoge.prototype.__defineGetter__('isHoge', function() { return this.hoge ? true : false; }); …
node.js でプロパティを増やしたい場合はこうする。node.js っていうかjavascriptかな。 var Hoge = function(bool) { this.hoge = bool ? true : false; }; Hoge.prototype.__defineGetter__('isHoge', function() { return this.hoge ? true : false; }); …