Skip to content Skip to sidebar Skip to footer
Showing posts with the label Module Pattern

In Javascript/coffeescript How Can I Mock Out A Module's Public Variable In A Test?

I just learned about the module pattern. I've written some code that's gotten sufficiently… Read more In Javascript/coffeescript How Can I Mock Out A Module's Public Variable In A Test?

Module Pattern- How To Split The Code For One Module Into Different Js Files?

For the module pattern, I'm doing something like: (function(namespace) { // tons of code … Read more Module Pattern- How To Split The Code For One Module Into Different Js Files?

How To Avoid Manually Caching A Request That Returned An Error?

I've created a module (following Javascript's Module Pattern) that makes an http request, c… Read more How To Avoid Manually Caching A Request That Returned An Error?