Andrew Rea

Andrew Rea


Stuff about programming, security and technical architecture

Twitter


javascript

Stuff about programming specifically containing JavaScript!

Why use Object.freeze

March 15 2015: An update to this post has been written: Why use Object.freeze and why not to use Object.freeze. I like JavaScript but I also like Encapsulation and Immutability. There is lots of information on the internet, in books, whitepapers etc... about the benefits of Encapsulation and Immutab…

Andrew ReaAndrew Rea

Encapsulation with JavaScript

All of the example make use of the Revealing Module Pattern and the Object.freeze method in JavaScript. All of the examples are using mocha and should libraries to implement the tests and the assertions. Whilst working on a recent project where I decided to use node.js, I wanted to achieve a much…

Andrew ReaAndrew Rea