Tag Archives: Singleton

A simple JavaScript singleton pattern

There are a number of different approaches that can be taken to creating singleton patterns in JavaScript – this one is both simple and effective and supports lazy initialisation. The following code shows typical usage of constructor functions:

#1: … Continue reading

Posted in Application Development, JavaScript | Tagged , , , , | Leave a comment