Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options questions only not deleted user 14625

This pattern is like the module pattern; it focuses on public & private methods. The difference is that the revealing module pattern was engineered as a way to ensure that all methods and variables are kept private until they are explicitly exposed; usually through an object literal returned by the closure in which it’s defined. It also allows the developer to avoid a lot of `this.` in the code.

3 votes
1 answer
155 views

Rock, Paper, Scissors, and the Revealing Module Pattern

After reviewing this approach: Rock-Paper-Scissors with the revealing module pattern I decided to write an alternative where the Revealing Module Pattern is used for the UI, model, and controller. I …
konijn's user avatar
  • 33.8k
20 votes
1 answer
550 views

Alea implementation

The following is an implementation of the Alea random number generation approach by Johannes Baagøe, reworked from the rot.js implementation by dropping all the pesky underscore prefixes in the variab …
konijn's user avatar
  • 33.8k