Upgrade to Pro — share decks privately, control downloads, hide ads and more …

My Daily Node

My Daily Node

LT at js-cafe vol7

@hotchemi

May 19, 2013
Tweet

More Decks by @hotchemi

Other Decks in Programming

Transcript

  1. var klass = $pvt("_" /* prefix */, { // public

    method access to public variable getPublicVariable: function() { return this.publicVariable; }, // public method access to private variable getPrivatevariable: function() { return _privateVariable; }, // privateϝϯόΛࢀর͍ͯ͠ΔprivateϝιουΛݺͼग़͢public method getPrivateMethodReferPrivateVariable: function() { return _getPrivateVariable(); }, // publicϝϯόΛࢀর͍ͯ͠ΔprivateϝιουΛݺͼग़͢public method getPrivateMethodReferPublicVariable: function() { // ͜ͷ৔߹͸ίϯςΩετΛࢦఆ͠ͳ͍ͱ͍͚ͳ͍… return _getPublicVariable.call(this); }, // privateϝϯόʹΞΫηε͢Δprivate method _getPrivateVariable: function() { return _privateVariable; }, // publicϝϯόʹΞΫηε͢Δprivate method _getPublicVariable: function() { return this.publicVariable; }, // public variable publicVariable: 1, // private variable _privateVariable: 2 }); Usage
  2. 4. γΣϧΞϓϦ΋NodeͰॻ͘ zaim-cli CLI based Zaim client. ŋrequire commander, colors.js,

    zaim.js ŋDirty code...callback is difficult. https://github.com/hotchemi/zaim-cli
  3. 5. ωλهࣄ͢ΒNodeͰॻ͘ yutori-blog-bot twitter bot for @megascus. ŋΏͱΓ advent calendar

    15೔໨ ŋRunnning on eXcale https://github.com/hotchemi/yutori-blog-bot